打开主窗体而不是快速创建窗体 - CRM

时间:2016-08-24 13:02:47

标签: dynamics-crm crm

我的功能应该从帐户打开报价快速创建表格,但它打开报价主表格。如何更改以打开“快速创建表单”?

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);
});

1 个答案:

答案 0 :(得分:1)

正如Milos所发现的,必须激活快速创建表单。