Preventing open the same object for more than 1 user

Hey Community How can we prevent User 1 from opening object A for editing when User 2 already has it open with unsaved edits, to avoid actions based on outdated information?
1 answers

I'm facing the same issue and I'm trying to use "Pessimistic Locking" 

you can check this link: 


This project provides a simple solution for Pessimistic* Locking that stores record locks in the database and so will work for applications that have the potential of horizontal scalability. 

The basic principle is to use the GUID of the object as the key for the lock record entity and apply a uniqueness constraint on the GUID.  This prevents two locks from being created for the same object, even if a second transaction commences before the first is committed.  


if this helps you please mark this as an accepted answer.