Hi,
I have been trying to set the default view for a lookup field in the process stage header. From my research the code seems correct but I always result in:
"There was an error with this field's customized event... Error: Unable to get property 'setDefaultView' of undefined or null reference."
The code should look like this:
Xrm.Page.getControl(arg).getDefaultView()
Xrm.Page.getControl(arg).setDefaultView(viewGuid)
with my variables:
var PRV = Xrm.Page.getControl("field_name").getDefaultView();
Xrm.Page.getControl("header_process_field_name").setDefaultView(PRV);
I have this calling on form load.
Can anyone make out what I could be doing wrong?
Thanks is advance!
*This post is locked for comments
I have the same question (0)