There is high probability of this command getting deprecated in the near future.
Dynamics CRMv9.0 made a client API available for developers through which we can get control's of whole forms as a collection.
If you want to lock "hsl_Amount", you use below code this would return controls as a collection and iterate through each loop to make control disable.
formContext.getAttribute("hsl_Amount").controls.forEach(function(control, index) { control.setDisabled(true); });
I would not recommend hard coding this in JS because it might break in a future release of CRM.
0 Comments