Skip to main content

Notifications

Announcements

No record found.

Dynamics 365/CRM JavaScript Reference

Community Member Profile Picture Community Member Microsoft Employee

[This post has been updated with the latest methods for Dyn365CE 9.0+. Originally Posted April 26, 2018] Dynamics 365/CRM has come a long way since the 4.0 and 2011 days when JavaScript was the only way to meet most custom requirements. We now have business rules, roll-up fields, calculated fields, process flows and more that can be configured to meet custom requirements right within the GUI (which is the recommended path when you can get away with it). But for the times when you can’t get what you need from the front end, here’s a quick D365/CRM JavaScript reference to help with syntax in your custom form scripts: TOC: Getting and setting field values: Get the value of a Text field Set the value of a Text field Get the text of a Lookup field Set the value and text of a Lookup field Get the value of a Numeric field Set the value of a Numeric field Get the value of a Bit field Set the value of a Bit field Get the database value and text of an Option Set Set the text and value of an Option Set Get the value of a Date field (01/31/2018 or 31/01/2018) Customizing forms: Show/hide form sections Show/hide form fields Set requirement level Use the value of an Option Set to set up form Open a specific form based on a field value Pulling data from related entities Pulling data from related entities


Getting and setting field values:

Get the value of a Text field Set the value of a Text field Get the text of a Lookup field Set the value and text of a Lookup field Get the value of a Numeric field Set the value of a Numeric field Get the value of a Bit field Set the value of a Bit field Get the database value and text of an Option Set Set the text and value of an Option Set Get the value of a Date field (01/31/2018 or 31/01/2018)


Customizing forms:

Show/hide form sections Show/hide form fields Set field requirement level Use the value of an Option Set to set up form Open a specific form based on a field value


Pulling data from related entities

Pulling data from related entities Note: This code has been provided for informational purposes only.

The post Dynamics 365/CRM JavaScript Reference appeared first on sa.global.

Comments

*This post is locked for comments