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:
*This post is locked for comments
Hi Kokulan,
I was testing it against the trial instance and including the form in model driven app solved my issue!, thanks a lot.
I'll try it one more time with the pictures...
Here is the execution picture:
But I'll get the main form. The "Allow quick create" option is checked and the form exists:
I was testing it in Chrome Version 73.0.3683.103 (Official Build) (64-bit)
Hi
I would first check if you are able to use the Global + button at the top to create record using Quick Create form for the entity.
Are you doing this from a Model Driven App? If so, have you included your Quick Create form in the app?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156