[TIPS] How to get Attribute/Field value without executionContext input
In Dynaimcs 365 JavaScript, sometimes there is no executionContext imput, for example, the JS called in ribbon button, or in a HTML webresouce.
Before Dynamics V9.0, you can use below to get an attribute/field value:
Xrm.Page.getControl("kc_signature1_base64").getValue();
But since V9.0, Xrm.Page has been deprecated although it's still available now.
I am not sure if below API has been deprecated, but it works well till now.
var signature1 = window.parent.Xrm.Page.getAttribute("kc_signature1_base64").getValue();
Just for your reference.
No comments:
Post a Comment