Monthly Archives: December 2009

Javascript escape

A simple tip for those of you having problems with special local characters like äåö (swedish) and others. Use the javascript function escape() or unescape() to format your localized strings.

var text1 = "åäö";
text1 = escape(text1);


Dynamics NAV code for string replace

A simple but useful NAV (Navision) string function for replacing all occurrances of any substring with any new string.

STRREPLACE(String : Text[256];Old : Text[256];New : Text[256]) : Text[256]
Pos := STRPOS(String, Old);
WHILE Pos <> 0 DO
String := DELSTR(String, Pos, STRLEN(Old));
String := INSSTR(String, New, Pos);
Pos := STRPOS(String, Old);

(Just declare a local variable Pos as Integer.)

Error installing Dynamics CRM client

If you recieve this errormessage:

*Microsoft CRM client requires Microsoft Office Outlook. Please install the current version of Microsoft Office Outlook.

Try this solution:

We had a similar issue with Outlook installed via group policy. The fix/work around was this.
Under HKCU\Software\Microsoft create a registry entry for MSCRMClient Under MSCRMClient create a new reg_dword key called "IgnoreChecks" Make the value 1
Re-run the installation. You will get the same error, however the Next button will be available and the install should complete without errors.

WCF MaxItemsInObjectGraph

How to set the MaxItemsInObjectGraph configuration.


("System.Runtime.Serialization.SerializationException : Maximum number of items that can be serialized or deserialized in an object graph is ‘65536’. Change the object graph or increase the MaxItemsInObjectGraph quota.").

"System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly"


You need to modify both the configuration file for the service as well as the client.

For the services configuration should look like this:">name="">

maxItemsInObjectGraph="2147483647" />

The client configuration should look like this:

binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IServiceViewEvent"
contract="ServiceReferenceViewEvent.IServiceViewEvent" name="WSHttpBinding_IServiceViewEvent">