When you are using JavaScript in your customizations and you are using a lot of trial and error, the development will go very slow.
To speed up your development you can use and external file for your JavaScript. The document will be loaded in the onLoad, onSave or onChange of the entity.
Because you are using an external file the entity does not need to be republished every time you make a change to the external Script (the script within MS CRM has not been changed and the external Script will be loaded every time internal MS CRM script is triggered). This will save a lot of time !!! Put the following Script in the onLoad, onSave or onChange of the entity you are developing and point it to the right file.

st = document.createElement("<script src='http://<server>/<site>/<filename>.js' language='JavaScript'>");
h = document.getElementsByTagName('head');
h[0].insertAdjacentElement('beforeEnd',st);

To test the output of a piece of code, it is often useful to use an alert:
alert(code tot test on output);

To see the output of a script without having to change the code, put:
javascript:alert(code to test on output)
in the address bar of internet explorer

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars (1 votes, average: 4.00 out of 7)
Loading ... Loading ...