dynamics-365 - Dynamics CRM v9.0 getIsDirty 不提供刷新值
问题描述
我正在使用动态 CRM 版本
9.1.0.4435 在线
. 我formContext.data.entity.getIsDirty()
在保存事件中使用时遇到问题。
在低于9.0的CRM 版本中,Xrm.Page.data.entity.getIsDirty()
根据字段的一个最新状态为我们提供了价值,如果我每分钟都调用此方法,它运行良好。
但是在 v9.0 中它被替换为formContext.data.entity.getIsDirty()
,即使存在脏字段,它也没有给我等于 TRUE 的值。有谁知道解决方法或知道这种行为的任何原因?
解决方案
我只是试图在我的 OnSave 事件实例上复制您的问题。
我的 CRM 版本:版本 1710 (9.1.0.4435) 在线
我尝试并为我工作的东西。
function testFunction(executionContext){
var formcontext = executionContext.getFormContext(); // gives me formcontext
formcontext.data.getIsDirty() // returns True for me when form is dirty
formcontext.getAttribute("caseorigincode").getIsDirty() // return true when this field is changes
formcontext.getAttribute("emailaddress").getIsDirty() // returns false as this field was not changed.
formcontext.data.entity.getIsDirty() // even this function returns true as form is dirty
}
推荐阅读
- python - 使用xpath单击iframe内的元素但不起作用
- fortran - gfortran 9.3.1 | SCL | 缺少 findloc 内在?
- r - Fizz Buzz 无法处理多个向量
- sql - 计算每个城市一个类别的支付百分比
- javascript - Javascript:复制数组中的每个字符串值
- java - 如何增加android中OkHttp中请求的超时时间?
- java - 如何在java中连接字段?
- java - “远程确认失败:scp:模糊目标”,同时使用 Windows 机器上的“scp”上传文件,而它在 Linux 和 Mac 上工作
- php - 在 WordPress 中将 +90K 帖子导入自定义帖子类型
- sql-server - 是否可以在 SSMS 中停用大纲?