FormType在Dynamics CRM 2016上未返回正确的值

问题描述 投票:0回答:1

enter image description here在javascript中,我写了Xrm.Page.ui.getFormType();

当表单为只读时,此代码不起作用。即使在表单上它以只读方式写在记录的底部,也给我2的表单类型。

甚至Onload显示格式2 enter image description here

javascript dynamics-crm dynamics-crm-2016
1个回答
0
投票

我能够快速测试它,如下所示。

第一种情况:用户的安全角色对该特定实体记录没有“编辑/更新”特权。所以页脚说,记录是活动,表单模式是只读

[alert(Xrm.Page.ui.getFormType());说3

第二种情况:该特定实体记录被停用/禁用。因此页脚说,记录为Inactive,而表单模式为Read Only。也适用于完成的活动记录。

[alert(Xrm.Page.ui.getFormType());说4

enter image description here

附带说明,不推荐使用Xrm.Page。必须使用formContext重写它们。

formContext.ui.getFormType();

Read more

© www.soinside.com 2019 - 2024. All rights reserved.