Is it possible to return an error when the total a...
# general
l
Is it possible to return an error when the total amount of invoice is changed via a WF? I tried return user error action with old record amount not equal to amount at before record submit which didn't work because I think old record works only at after record submit.
p
This would probably be something better done by a script.
f
It should be possible 1. Create a workflow field named "Total Before Edit" 2. Add action to set above field value with current invoice total (trigger should be "Before User Edit") 3. Add action to return error when "Total Before Edit" is not equals to "Total" (trigger type should be "Before User Submit")
l
Thanks. I created a custom transaction body field instead of a workflow field. I always forget about workflow fields. It's better as the user does not need to see the field anyway.
My trigger in no. 2 is before record submit though and not before user edit.
f
Yap, that should work as well
👍 1