Regarding the exclusive access control for OutSystems application, you can refer to the following document.
How To Handle Concurrent Updates on Application Data Records:
https://success.outsystems.com/Documentation/How-to_Guides/Data/How_To_Handle_Concurrent_Updates_on_Application_Data_Records
Following the method noted in the document, you can implement a kind of Optimistic Locking and notify the user if the collision occurs. Then, the user can decide whether override the record or not. With this method, though the target of the concurrency is the whole record. If you need to control the exclusiveness based on each field (column) not the whole record (table’s row), you need to figure out the way to implement it.
This forge component shows a sample implementation to achieve the column-based concurrent update. This sample shows how we can implement exclusive access control in the following use cases.
SampleTable
- Name
- Description
Scenario 1:
User A and B concurrently access the same record of SampleTable. User A modified ‘Name’ field and saved the data. Then, User B modifies ‘Description’ field and saves the data.
-> In this scenario, User B can save his/her data without any warning.
Scenario 2:
User A and B concurrently access the same record of SampleTable. User A modified ‘Description' field and saved the data. Then, User B modifies ‘Description' field and saves the data.
-> In this scenario, User B gets warning. The warning says "The Description field was already modified. Will you override it with your data?"
Please note OutSystems does not provide a method to iterate entity's attributes, this sample needed to check each attribute value with hard-coded if/switch statements.