778
Views
1
Comments
Solved
GetForUpdate lock type
Question

When using GetForUpdate entity action, the record is locked untill the transaction is committed, says the documentation.

But, during the time of the lock, is the record readable by other instances?
Would a GetById be able to show the record data on the screen during the lock?

2021-04-17 09-53-48
José Gonçalves
Solution

Hi,

that lock means locked for Update or Delete, the record can still be read. You can see more details in the following link:

https://www.outsystems.com/help/ServiceStudio/9.1/index.htm#t=Using_Data%2FGet_for_Update_Action.htm

This function retrieves all the attributes for the record that has the input argument Id as its Identifier. If some of the attributes are empty in the database, they are always converted to the corresponding default values.

In the database, the row that corresponds to the selected record is locked and no other user can manage its information; i.e. while the operation is being processed, no other GetForUpdate , Update , Delete or any SQL statements that change this record are executed. The lock on the record is released when a commit or rollback occurs.

On the other hand, Get or any SQL statements that query this record are executed.

Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.