简体   繁体   English

防止用户覆盖记录CRM 2011

[英]Prevent user from overwriting the record CRM 2011

I have a process that runs at specific time and updates records in "Open" state and disables them. 我有一个在特定时间运行的进程,它会更新处于“打开”状态的记录并禁用它们。 Recently I had a case when user opened the record almost at the same minute as the process was doing it's job. 最近,我遇到一种情况,用户几乎在流程执行工作的同时打开记录。 So while user was manually entering the data, process would already update the record and set record status to "Disabled". 因此,当用户手动输入数据时,过程将已经更新记录并将记录状态设置为“已禁用”。 However, since user doesn't refresh the screen, when record saved, the status would change back to "Open" and wipe some data. 但是,由于用户不刷新屏幕,因此在保存记录时,状态将变回“打开”并擦除一些数据。

Any ideas on how this overwriting can be prevented? 关于如何防止这种覆盖的想法?

PS Process and the user should both have power to edit the record, but once it's disabled it should be locked somehow. PS Process和用户都应该有权编辑该记录,但是一旦禁用该记录,就应该以某种方式将其锁定。

In crm 2011, not sure if the optimistic concurrency is available in any update rollups. 在crm 2011中,不确定在任何更新汇总中是否都可以使用乐观并发。 But Optimistic concurrency using row version concept was introduced later in 2015 update 1. 但是2015年更新1中引入了使用行版本概念的乐观并发。

You can implement similar approach, by querying the record again and verify the modifiedon between DB record & user modified record, then stop the execution & ask user to refresh to get latest data. 您可以通过再次查询记录并验证数据库记录和用户修改的记录之间的修改,然后停止执行并要求用户刷新以获取最新数据,来实现类似的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM