Search code examples
dynamics-crmcrm

Opening Main form instead of Quick create form - CRM


I have function that should open Quote Quick Create Form from account, but it opens Quote Main Form. What should i change to open Quick Create Form?

var thisAccount = {
entityType: "account",
id: Xrm.Page.data.entity.getId()
 };

 var callback = function (obj) {
    console.log("Created new " + obj.savedEntityReference.entityType + " named '" + obj.savedEntityReference.name + "' with id:" + obj.savedEntityReference.id);
 }

var setName = { name: "Quote made by " + Xrm.Page.getAttribute("name").getValue() };
 Xrm.Utility.openQuickCreate("quote", thisAccount, setName).then(callback, function (error) {
    console.log(error.message);
});

Solution

  • As discovered by Milos, the quick create form must be activated.