Automatically retrieve the name of the web resource control in forms

0
37
Forum Post: Change the Filter On option on Opportunity Associated View for Account form


Hello,

I am creating a control for my Dynamics CRM forms. This control is basically a simple HTML web resource with some JS. In the JS code, I would like to do the following:

parent.Xrm.Page.getControl(currentControlName);

As the currentControlName is something that may change depending on who adds it the form, I do not want to hardcode in my resource:

var currentControlName = "WebResource_[a control name]";

Is there a way to automatically determine in which control my JS is running?



Source link

Leave a reply

Please enter your comment!
Please enter your name here