Dynamics 365 CRM V9+ New Feature: Dependent Attributes in JavaScript

Prashant Kumar Maurya

Dynamics 365 9.0 has introduced a new feature that enables adding field dependency with a JavaScript web resource. It gives below benefits

  1. It will restrict deletion of field(s) if it is being consumed in a js web resource. In earlier versions user was able to delete field(s) even if it is used in a js logic, and it causes exception in js execution.

  2. Dependent field(s) value will be available on form UI, even if it is not added on form. That’s right you don’t have to fetch its value from CRM now (earlier we have to fetch field(s) value using odata or web API if it is not available on form and its value is needed in js logic.)
    1. Field value(s) can be access through entity attribute {ie. Xrm.Page.getAttribute(“new_testfield1”).getValue();}
    2. Accessing value(s) of the field through control {ie. Xrm.Page.getControl(“new_testfield1”).getValue();} will cause an error (as we have not added a…

View original post 110 more words

Blog at WordPress.com.

Up ↑