Hi, I am trying to create an error message on selecting a button named "Reject" if reject is selected, but a field called approval comments is empty, I want the user to get an error message telling them it needs to be filled out.
m
MGBC
09/01/2022, 7:42 PM
Could you put a condition on the Add Button action that it only shows the button when that field is NOT empty?
MGBC
09/01/2022, 7:42 PM
Then they can't even click the button until it's filled out
n
Noel B
09/01/2022, 7:45 PM
I wish there was a way to warn them though. They can still click the button, but nothing happens.
Noel B
09/01/2022, 7:46 PM
So some users think they have completed the rejection, but in reality they are clicking a button that does nothing.
m
MGBC
09/02/2022, 2:41 AM
I've done it where you add a condition to the Add Button action of field Approval Comments is NOT empty. So then the Reject button doesn't even show up until the Approval Comments are filled in.
Then you can also add a custom Inline HTML field (Outside Columns Above) that would display red text like "The Approval Comments field is blank. Please fill in the Approval Comments before rejecting this transaction" Or something like that. I've done that a few times and it ends up pretty effective.
You can also try the Go To Record Action when they click the Reject button and redirect them to a custom record called "Rejection Reason". That works too but it's a little clunky.
r
raghav
09/02/2022, 7:31 AM
I have a similar approval flow where if they try to approve a sales order when location is empty it throws an error.
What you can do is
Form approve/reject state you can create one more state show message.
In which it flow if the approval comment is empty and user clicks on reject button.
And inside the show message state on entry you can return user error approval comments cant be blank.
And then again put a button resubmit for approve/reject which will take you back to your approve/reject state.