I feel like I'm doing something fundamentally wrong here.
var entityFormOptions = {}; entityFormOptions["entityName"] = "connection"; var formParameters = {}; formParameters["record1id"] = node.data.id; formParameters["record1idname"] = node.text; if (Xrm.Internal.isUci()) { formParameters["record1idtype"] = node.data.typename; } else { formParameters["record1idobjecttypecode"] = node.data.typename; } Xrm.Navigation.openForm(entityFormOptions, formParameters);
The above code works, but:
1) It uses a method from the Internal workspace (Why does record1idtype not work in classic interface?)
2) I'm passing a string entity name to objecttypecode instead of an actual integer object type code (which fails if I do it)
All I'm trying to do is set a default record1 lookup value when I open a new connection form. But it either doesn't work in classic or unified interface, depending on what "type" property I'm setting.
Any help is appreciated.