我下面有一些代码,如果启用,我可以通过这些代码为实体打开快速创建表单,但如果未启用,我想在新窗口中打开。我需要确定实体是否在定义上启用了快速创建表单,以及如何通过 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
关于dynamics-crm - 如何通过Javascript识别实体是否启用了快速创建表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56610958/