Hello All,
I have 2 forms(Form A and Form B) in Lead entity. Whenever user click the 'New' button to create new record in lead entity, a popup will ask the user to open Form A or Form B. I have created a HTML dialog and call it on click of 'New' button. On the user selection I'm opening either the Form A or Form B.
This functionality is working good in classic UI but not working in UCI.
I am using the below code snippet:
openSelectedLeadForm: function () {
debugger;
var iFrameParameters = Alert.getIFrameWindow();
var formA = iFrameParameters.formA;
var entityFormOptions = {};
var formParameters = {};
entityFormOptions["entityName"] = "lead";
if (formA) {
formParameters["formid"] = "JIJ85HUG-J8G3-9865-NKLS-KJOG8J49DM4K";
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function (success) {
alert("Success");
},
function (error) {
alert("Error : " error.message);
});
}
else {
formParameters["formid"] = "KIOEJID3-8D2H-KJ4H-LK4D-KJIDG49XOK4F";
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function (success) {
alert("Success");
},
function (error) {
alert("Error : " error.message);
});
}
},
Please tell me am i missing any change required it to work in UCI.