We are currently running Entity in OutSystems with the following configuration and have a question about whether Get[Entity]ForUpdate can update via ServerAction with a lock on the Entity.
Current configuration:.
Core Module
Entity
Entity1
GetEntity1ForUpdate
UpdateEntity1
Server Action
Entity1toEntity1StrRecord
Entity1StrRecordtoEntity1
GetEntity1ForUpdateServerAction
Output the return value (Entity1 type) of GetForUpdate as it is
UpdateWithLockEntity1ServerAction
Service Action
UpdateWithLockEntity1ServiceAction
Application module
XXServerAction
Question:.
In this configuration, is it possible for GetEntity1ForUpdate to update via ServerAction with a lock on the entity?
Specifically, the value passed is as follows
XXServerAction → ServiceAction → Entity1StrRecordtoEntity1, passing the structure (Entity1 Str Record type) of the entity that contains the post-update information.
In GetEntity1ForUpdateServerAction, the return value (Entity1 type) of GetForUpdate is passed as is.
In the UpdateWithLockEntity1ServerAction, the output parameter of GetEntity1ForUpdateServerAction is the same as the one inherited from the ServiceAction (actually Entity1 StrRecordtoEntity1) to the output parameter of GetEntity1ForUpdateServerAction, which is then used as the argument for UpdateEntity1.
Could you please advise if GetEntity1ForUpdate works as expected in this way (i.e. while keeping the entity locked)?
Hi,
The way you try to explain your logic by writing it out makes it hard to follow. It would be easier for People to help you if.you share screen shots or even better an OML file.
-- Daniel