Advanced error handling

While the basics of any good development practice include error trapping and handling, when using JavaScript with Dynamics CRM 2011 your options revolve around using the try/catch block in a creative way. But the standard catch block has some additional features you should be taking advantage of when needed.

Getting ready

For this exercise we will be either using an existing solution or creating a new one. We will be creating a script that shows all available error-handling options available to us when using JavaScript with Dynamics CRM.

How to do it...

For advanced error handling perform the following steps:

  1. Open your existing solution or create a new one.
  2. Add the Contact entity to your solution.
  3. Create a new Two Options field ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.