Hello guys, I have one issue with the Client API reference.
You should be able to open form through client javascript.
But it's not working, has someone came accross the same issue?
I'm calling method openForm from button in the ribbon.
Every variable has the right value, but instead of quickCreateForm, I'll get the main form.
This is my javascript:
function openNewPrefilledKeepingEntityQuickCreate(entityLogicalName, entityId, nameField, friendlyNameField){
var entityFormOptions = {};
entityFormOptions["entityName"] = "talxis_o365groupssynckeepingentity";
entityFormOptions["useQuickCreateForm"] = true;
if (friendlyNameField === undefined) {
Xrm.WebApi.retrieveRecord(entityLogicalName, entityId, `?$select=${nameField}`).then(
function success(result) {
var formParameters = {};
formParameters["talxis_name"] = result[nameField];
formParameters["talxis_targetedrecordurl"] = `?etn=${entityLogicalName}&id=${entityId}`;
debugger;
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function success(result) {
console.log(result.message);
},
function (error) {
console.log(error.message);
});
},
function (error) {
console.log(error.message);
}
);
}
else {
Xrm.WebApi.retrieveRecord(entityLogicalName, entityId, `?$select=${nameField},${friendlyNameField}`).then(
function success(result) {
var formParameters = {};
formParameters["talxis_name"] = result[nameField];
formParameters["talxis_friendlyname"] = result[friendlyNameField];
formParameters["talxis_targetedrecordurl"] = `?etn=${entityLogicalName}&id=${entityId}`;
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function success(result) {
console.log(result.message);
},
function (error) {
console.log(error.message);
});
},
function (error) {
console.log(error.message);
}
);
}
}
Here is the execution picture:

But I'll get the main form. The "Allow quick create" option is checked and the form exists:

