function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shaker Kuncham 1Shaker Kuncham 1 

how to prevent multiple users working on the same case -- Standard case object.

Hi All


Is it possible to prevent the multiple users accessing the same case / editing the same case at a time. When multiple users working on the same case it should throw error, " syaing : other user is working on the case "

Regards
Shaker
Ravi Dutt SharmaRavi Dutt Sharma
Hey Shaker,

If you are using standard layout, then I think it is not possible to achieve this. But if you have a VF page and a controller for creating / editing your case records, then you can use FOR UPDATE clause is your SOQL query to lock the records.

More information on locking statments can be found here : Locking records in SOQL (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_locking_statements.htm)