Does anyone know how to lock a record for a minute...
# general
t
Does anyone know how to lock a record for a minute for just the user that created it or for a certain role? We have some workflows that run to update fields on a sales order after creation (syncs to other systems) and we don't want edits from users in a small time frame.
c
Is it a custom record or normal record?
t
normal sales order (with custom form of course)
c
Could probably schedule a workflow, or as the last action on system updates unlock it after the last update is made
Custom records have optimistic locking as an option
i.e. you lock the record except to admin
you finish your edits
the last update is unlocking the record
t
How does it determine a start/finish of editing? Basically, our system syncs with another and will read/write (using a role we created for it).
c
the record is locked (except to your created role and admin)
then do a saved search with a checkbox that unlocks it after 15 minutes
is probably simplest
t
yeah, I wish the saved search workflow had more lengths of time. It would be much more versatile if it wasn't 15 min, 30min etc
c
right, time is not easy...
hence why your "last update" which if it's a certain status, could also be the unlocking function