-
Book Overview & Buying
-
Table Of Contents
Microsoft Dynamics CRM 2011 Scripting Cookbook
By :
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.
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.
For advanced error handling perform the following steps:
Open your existing solution or create a new one.
Add the Contact entity to your solution.
Create a new Two Options field named Error Handling (new_errorhandling). Leave the standard Yes and No options.
Add the field to the form.
Save and publish the form.
Create a new JScript web resource named JS Error Handling (new_JSErrorHandling).
Add the following function to your...
Change the font size
Change margin width
Change background colour