10/29/2016 Leave a comment
Dynamics CRM 2013 to 2015 we are able to set the default “Look for” entity and “Look in” view of the “Look Up Record” dialog using the following:
This no longer works in CRM 2016 and I believe the source of the problem is explained here. Basically the new form rendering engine loads each script in separate iframes instead of the same frame as the form. This makes it so the document.getElementById() method can no longer find the element with the given name.
Finally I find out solution and it work for me.
I want to set “regarding” field in phone call to “contact” entity only.
var control = Xrm.Page.getControl(“regardingobjectid”);
It works perfectly for me. Please try and post your comments if you face any issue.