Use case: I have a manual workflow button "Approved" on a page for creating and approving Requests. Once pressed it will set the Request status as Approved. Now it should be possible to validate that the approver's approval limit is greater than the requested amount. So it should also be possible to run entity's "API script before save" client side validations when manual workflows are triggered or client side validations should be included in manual workflow definitions.
Validations for Manual workflow buttons
Collapse
X
-
-
Currently, it's possible with Conditions (defined in Dynamic Logic). You need to have the amount you are going to check against to be stored in the entity somehow.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
-
This is how I made it. I created a new varchar field "message" which is updated with the validation error message in the manual workflow. It is placed in a panel that is visible only if message is not empty. To clear the message field, I created dynamic handler for the page that clears the message field in the background if it has value.
Espo.Ajax.putRequest('Requisitions/' + recordId, {
"message": ""
})Comment
Comment