Support Article
Cancel on screen with required field gets validation error
SA-19761
Summary
User has upgraded from Pega 7.1.7 to Pega 7.1.9. They have configured a form with required fields. By default the form would have a "Submit" and a "Cancel" button. On click of the "Cancel" button, a validation triggers on the required fields.
Error Messages
"Value cannot be blank"
Steps to Reproduce
1) Create a form which contains required fields.
2) Use it in a Flow Action and run the Flow.
2) Click on the cancel button, we observe that the validation triggers on the required fields which is not an ideal behavior.
Root Cause
By default, client-side validation is enabled for the work Review action. The Cancel button is available as a standard flow action button. The Cancel button invokes the Review action. If client-side validation is enabled on the harness of the work form, the Cancel action halts and you see the error window on the screen.
Resolution
In order to suppress the client side validation, add the following code in user work form.
<script>
pega.u.d.bClientValidforReviewAction = false;
</script>
Note: The behavior has been resolved in Pega 7.1.9
Published March 4, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.