jump to navigation

Microsoft Dynamics CRM 4.0 Setting field requirement level with jscript July 23, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , ,
add a comment


Sometimes it is necessary to change a field’s requirement level after the action of something else. Lets say you have a picklist called Contact Method, and one of those values is “email”. Once the user selects email, you want the email field to now become a required field so he/she doesn’t accidentally forget to put in the email address. However, the user may select the value “phone”. You then wouldn’t want the email address to be required because its not applicable, the phone field is what you want required. The point is, you need the field to become required when a particular value is selected, not all the time. Place this line of code onchange of the field you want to trigger it. Replace “fieldname” with the name of your field you want to set the requirement level on.

crmForm.SetFieldReqLevel(“fieldname”, 1);

Enjoy!

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com