"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу

Sunday 20 February 2011

How to set required level of a control in MS Dynamics CRM 2011 using Javascript

MANDATORY:
Xrm.Page.getAttribute(YourAttributeName).setRequiredLevel(“required”);

OR

SetFieldRequiredOrRecommended(crmForm.all[YourAttributeName+ "_c"], FIELD_REQUIRED, "");

RECOMMENDED:

Xrm.Page.getAttribute(YourAttributeName).setRequiredLevel(“recommended”);
OR
SetFieldRequiredOrRecommended(crmForm.all[YourAttributeName+ "_c"], FIELD_RECOMMENDED, "");

NONE:
Xrm.Page.getAttribute(YourAttributeName).setRequiredLevel(“none”);
OR
SetFieldRequiredOrRecommended(crmForm.all[YourAttributeName+ "_c"], FIELD_NOT_REQUIRED, "");

No comments:

Post a Comment