Skip to content

Instantly share code, notes, and snippets.

@DynCon365
Last active April 24, 2018 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DynCon365/38c564f1ec4a233a701014dbedc3fa3d to your computer and use it in GitHub Desktop.
Save DynCon365/38c564f1ec4a233a701014dbedc3fa3d to your computer and use it in GitHub Desktop.
Dynamics 365/CRM | Set required level of a field
// Consider using Business Rules before using this code
// Set Opportunity Est. Close Date as optional
Xrm.Page.getAttribute("estimatedclosedate").setRequiredLevel("none");
// Set Opportunity Est. Close Date as required
Xrm.Page.getAttribute("estimatedclosedate").setRequiredLevel("required");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment