Hi there,
My version is 2022.9.6 and i try since a few major versions to implement a locking or warning feature for when a record is updated in the background while someone is editing it.
so i tried with trigger ābefore updateā and checked in a first attempt if the date has changed in the meantime. the logic is working and it hits the āerrorā step in the workflow since my alert message one step before the āErrorā step is beeing shown.
But the record is saved regardless, i didnt figgured any way to prevent the save. with āErrorā Step i mean the one which says: āThrows error and stops workflow execution, also prevents saving of records triggered with before triggerā
We had some serious problems in the past with some overwritten values.
One possible solution that might work here is to determine when this overwrite might happen(which you already have in place) in that event, use the āoldRecordā values and set them to the current ārecordā Compose record and save the old values back.
This can be found on the trigger; please see the picture below.
Thanks for your answer. Its a interesting approach.
I could do a fresh rec lookup at ābefore updateā and if the record has changed in the meantime while editing i can set it to either the old record, or the new (just fetched) one.
But the problem is still that the āerrorā step in the WF which should prevent the record save at the end is not preventing the save. it is updated regardless. maybe i missuse the error step somehow?