Debug the JavaScript That We Write for Some Validation on Entity Pages in Dynamics CRM

Debug the JavaScript that we write for some validation on entity pages in Dynamics CRM

Microsoft Dynamics CRM 2011 provide many opportunities to use JavaScript. You can use JavaScript to perform actions in form scripts, ribbon commands, and web resources.

Following are the steps that are needed to be followed:

  1. Enable the Debugging in the Internet Explorer - Go to Tools >> Internet Options (wizard will appear >> Click the 'Advanced Tab' >> Under Browsing Section uncheck the 'Disable script debugging' checkbox >> Click OK.|

  2. Edit the java script code of the Entity Page that you want to debug.
  3. Put the statement 'debugger;' above the line where you want do the debugging. e.g. suppose my java-script show 'Hello World' message and want to debug this then following is the way I am going to add script:

    alert('Hello World')
  4. Save and Publish corresponding customization.
  5. Perform the operation that would trigger the java script written by you
  6. Debugger dialog box will appear and select appropriate debugger (Visual Studio new or existing instance)

And you may start debugging from the 'Debugger' statement of your JavaScript.

Also Each browser provides some kind of debugging extension. Internet Explorer provides developer tools you can use to debug scripts in Microsoft Dynamics CRM. The Internet Explorer developer tools can be opened by pressing F12 when viewing a page using Internet Explorer.

Ebook Download
View all
View all