Question

1
Replies
260
Views
GouseMohiuddin Member since 2015 2 posts
PEGA
Posted: 4 years ago
Last activity: 4 years 6 months ago
Closed
Solved

Validation fail on Cancel button

Kindly refer to the below PDN link

https://pdn.pega.com/troubleshooting-cancel-flow-action-displays-error-%E2%80%9Cplease-correct-flagged-fields%E2%80%9D

My question is

Does making this change in UserWorkForm not have any other implications?  I've checked this in 7.1.7 and still this issue exists.

As per my analysis onClick of  cancel button we are calling Review action . If we analyse the code a little further: inside Submit function(pega_ui_doc_submit) the strAction which is  being passed as an argument upon click of Cancel button has an attribute

"skipClientValidations" which is set as true.  This attribute might have been set(as name suggests) to surpass the client side validations.

So instead of below  if block in Submit function

if ( !strAction == "" && (pega.u.d.bClientValidforReviewAction || !(oActionURL.get("HarnessPurpose") && oActionURL.get("HarnessPurpose") == "Review")))

it should have been

if ((oActionURL.get("skipClientValidations")=="" || !(oActionURL.get("skipClientValidations"))) &&!strAction == "" && (pega.u.d.bClientValidforReviewAction || !(oActionURL.get("HarnessPurpose") && oActionURL.get("HarnessPurpose") == "Review"))).   Tried this change by making a private edit of  "pega_ui_doc_submit" and it worked fine.

My intention is adding pega.u.d.bClientValidforReviewAction = false; may have implications else where.

So what I think is there should have been an extra check in the if block of Submit function.  Please do correct me if I'm wrong.

User Interface
Moderation Team has archived post
Share this page LinkedIn