The value of using Visual Studio to edit your Dynamics CRM JavaScript

As I have stated previously, if you are not using Visual Studio to edit your Dynamics CRM JavaScript, you are doing yourself a huge disservice.

Consider this code:

 

image

 

Can you spot the problem? Visual Studio and Resharper did.

Notice the blue line under Industrytotal? It is there because Industrytotal has not been defined previously.  Actually, Industrytotal is a typo.  It should be industrytotal.  Remember that JavaScript is case sensitive and is a dynamics language.

So basically, the code is assigning a value to a variable which is never used.  This is perfect legal, but useless, JavaScript.

Leave a Reply 4 comments