Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

On screen fields are validated when cancel button is clicked

SA-13467

Summary



Users have enabled Out of the box (OOTB) cancel button on the harness for both screen flows and process flows. However once clicked on the cancel button fields are validated hence user is not able to cancel the flow.

Error Messages



Error message pops up to validate errors before submitting.

Steps to Reproduce



1. Go to case which has client side validation enabled
2. Click on cancel task button

Root Cause



An issue in the custom application code.

Client side validation is being fired on Cancel button configured with activity ResolveCancelFlow.

Resolution



On click of CancelTask doFormSubmit() function is called. This is causing the form to be validated and the message show up.

Perform the following local-change:

Paste the following code in userworkform:
<script>

function enableValidation()
{
pega.u.d.bClientValidforReviewAction = true;
bClientValidation = true;
}
function disableValidation()
{
pega.u.d.bClientValidforReviewAction = false;
bClientValidation = false;
}

</script>

In pyCaseActionAreaButtons section, under cancelTask actions, add 2 additional run scripts – disableValidation (before doFormSubmit) and enableValidation (after doFormSubmit).

Now client side validation is not fired on Cancel.

 

Published August 31, 2015 - Updated December 2, 2021

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice