I'm trying to pass custom entity reference as parameter on Xrm.Navigation.openForm.
var entityFormOptions = {};
var formParameters = {};
entityFormOptions["entityName"] = "appointment";
formParameters["formid"] = appointmentFormGuid;
entityFormOptions["openInNewWindow"] = true;
entityFormOptions["navbar"] = "on";
entityFormOptions["cmdbar"] = true;
formParameters["new_branch_location"] = branch.id;
formParameters["new_branch_locationname"] = branch.name;
formParameters["new_branch_locationtype"] = "10170";
Xrm.Navigation.openForm(entityFormOptions, formParameters);
I added these parameters to the form's properties.
1) when I'm trying to save form that opened with Xrm.Navigation.openForm with the unified Interface, I get this error :
2)When I'm opening the form (not from JS code) with the unified Interface, I get this error:
On the desktop UI everything is working fine.
Thank you very much!