簡體   English   中英

如何識別一個實體是否通過 Javascript 啟用了快速創建表單?

[英]How to identify an entity has quick create form enabled or not by Javascript?

我在下面有一些代碼,如果啟用,我將打開實體的快速創建表單,但如果未啟用,我想在新窗口中打開。 我需要確定實體是否在定義上啟用了快速創建表單,以及如何通過 Javascript 執行此操作?

var entityFormOptions = {};
entityFormOptions["entityName"] = "contact";
entityFormOptions["useQuickCreateForm"] = true;

// will make it true if quick create form not enabled
entityFormOptions["openInNewWindow"] = false;

// Set default values for the Contact form 
var formParameters = {}; 

// Open the form. 
Xrm.Navigation.openForm(entityFormOptions, formParameters).then( function (success) { console.log(success); }, function (error) { console.log(error); });

我找到了解決方案,我可以通過這個api請求找到IsQuickCreateEnabled

[organization URI]/api/data/v9.0/EntityDefinitions

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM