Skip to Content
0
Dec 07, 2021 at 06:05 AM

How Can I Save a Supplier only once and then lock it?

223 Views

Hi,
I was wondering how I can lock a supplier after a user has made changes to it and saved them once.

ATM I count according to the before save event.
If a before save event happens a field gets a +1 and then If another before save event is attempted it will fail.
Lets say that a user has changed the house number of a supplier.
He saves the supplier and now I need to stop anyone else from making any further changes to the supplier, meaning I need to not allow any more saves.
But if after changing the house number in the UI and trying to save the user got an error because of some other field that was set wrong, the before save counter goes up but no actual save was made.
This means that after the user corrects the wrong field he cannot save his change to the house number cause the before save counter has ticked in the failed save attempt.

Thanks in advance.