Skip to content

Instantly share code, notes, and snippets.

@DynCon365
Created April 4, 2018 20:10
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/7a939e115ddaf447728a1bfdfe23734e to your computer and use it in GitHub Desktop.
Save DynCon365/7a939e115ddaf447728a1bfdfe23734e to your computer and use it in GitHub Desktop.
Dynamics 365/CRM | Set the value of a Numeric field
// Set the value of a custom Age field on a Contact
// Set the Contact's age to 25
Xrm.Page.data.entity.attributes.get("new_age").setValue(25);
// Set the Contact's age to a variable
var age = 25;
Xrm.Page.data.entity.attributes.get("new_age").setValue(age);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment