Set Field Required Dynamically – Using JScript for CRM 4.0 switch (parseInt(event.srcElement.DataValue, 10)) { /* Opportunity Rating Picklist */ case 1: /* Hot */ crmForm.SetFieldReqLevel(“pricelevelid”, 1); crmForm.SetFieldReqLevel(“estimatedvalue”, 1); crmForm.SetFieldReqLevel(“estimatedclosedate”, 1); crmForm.SetFieldReqLevel(“closeprobability”, 1); break; case 2: /* Warm */ crmForm.SetFieldReqLevel(“pricelevelid”, 1); crmForm.SetFieldReqLevel(“estimatedvalue”, 0); crmForm.SetFieldReqLevel(“estimatedclosedate”, 1); crmForm.SetFieldReqLevel(“closeprobability”, 0); break; case 3: /* Cold */ crmForm.SetFieldReqLevel(“pricelevelid”, 0); crmForm.SetFieldReqLevel(“estimatedvalue”, 0); crmForm.SetFieldReqLevel(“estimatedclosedate”, 0); crmForm.SetFieldReqLevel(“closeprobability”, 0); break; /* All other values */ default: crmForm.SetFieldReqLevel(“name”, 0); crmForm.SetFieldReqLevel(“customerid”, 0); break; } Rate this:Share this: Click to email a link to a friend (Opens in new window) Email Click to print (Opens in new window) Print Tweet Click to share on WhatsApp (Opens in new window) WhatsApp MoreLike Loading... Related Author: Arvind Singh Solution Architect with 17+ years of exp. In Dynamics CRM, Power Platform, Azure which includes Solution, Design, Development, Deployment, Maintenance and support experience. View all posts by Arvind Singh