// Info of child entity
var entityFormOptions = {};
entityFormOptions["entityName"] = "cr1a2_class";
entityFormOptions["useQuickCreateForm"] = true;
entityFormOptions["openInNewWindow"] = true;
// Info of parent entity
var formParameters = {};
formParameters["new_classesid"] = Xrm.Page.data.entity.getId();
formParameters["new_classesidname"] = Xrm.Page.getAttribute("name").getValue();
formParameters["new_classesidtype"] = "account";
// Open form in new window
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function (lookup) {
console.log("Success"); a
},
function (error) { console.log("Error"); }
);
Comments
Post a Comment