2016-08-24 56 views
1

我有功能,应该打开报价快速创建窗体从帐户,但它打开报价主窗体。我应该更改什么来打开快速创建表单?打开主窗体而不是快速创建窗体 - 客户关系管理

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

什么版本的CRM正在使用? –

+0

CRM2016。同时我发现我应该在实体上激活快速创建表单,所以现在就解决了。谢谢! –

回答

1

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