Handling unexpected user input

In this recipe we will be looking at how to handle unexpected user input. While this is already in place for some specific field types, we can easily enhance the system functionality through very simple validation scripts and user feedback messages.

Getting ready

Using one of the previously created solutions or creating a new solution, add the Contact entity to the solution. We will focus our attention on the Contact fields, but the same code can be applied to any standard or custom entities created in Dynamics CRM.

Some standard field formats in CRM include elements of user input validation. Upon data entry, users are prompted if their input is invalid, and the focus returns to the field, while the incorrect input ...

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.