Reputation: 383
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);
});
Upvotes: 1
Views: 1883
Reputation: 17562
As discovered by Milos, the quick create form must be activated.
Upvotes: 1