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

Facing issue with Cancel option in Confirm pop-up window



Requirement is to have a modal dialog window where user will have different link options to choose. Upon choosing one option, user must confirm the selection in a pop-up window.

As the application developer can not launch another modal dialog from existing modal dialog window, Run-Script option is used to launch Confirm pop-up window . When the user selects "OK", a flow action will be called which resolves the case and when "Cancel" is selected user must be redirected to previous screen where user has launched the Modal dialog window. But in current scenario the user is redirected to the Screen where the assignment exists and the user has to open the assignment to go back the required screen.

On the link option in Modal dialog window, application developers have configured "On Click" event with actions Run Script and Launch Harness. In order to continue on the same screen, the Launch Harness configuration on the Link option is removed, this is working fine for "Cancel". But when user selects "OK", the case is resolved by the flow action, but the Harness is not refreshed because of which the user is not able to see the current status of the work object.

Error Messages

Not Applicable

Steps to Reproduce

1. Create a button and configure " On Click" event with "Local-Action" action. The flow action must be launched using Modal Window.
2. The section in the above configured flow action must have Link option. Link must be configured with "On Click" event with actions Run Script and Launch Harness.
3. Script must launch Confirm pop-up window, on select in OK, a flow action must be called which will resolve the case. On select in "Cancel", no action must be handled in the script.

Root Cause

The root cause of this problem is software use/operation error. User has configured a modal window from which he is clicking on a link. This link calls a Runscript where a custom script to performFlowAction is executed. User wants to perform a conditional event handling in this script. 


This issue is resolved through the following Local-change:

function setConfirmRejectAR(ev){
var returnValue = confirm("By selecting Reject Work,this will change the status to Reject Work as Non-WellCare Member.Do you wish to continue?");
  if (returnValue == true) {

else {

var orig;
var flowActionName="";


pega.ui.Doc.prototype.performFlowACallback = function(oResponse,containerNode,closeReason) {



var orig1;
orig1 = pega.ui.Doc.prototype.performFlowAction;

pega.ui.Doc.prototype.performFlowAction = function(taskStatus,event,tempInterestPage,tempTaskStatus,overlayNode, showOnlyMask,closeReason) 
flowActionName = taskStatus;,taskStatus,event,tempInterestPage,tempTaskStatus,overlayNode, showOnlyMask,closeReason);


The above code safely overrides the callbackFunction; performFlowACallBack which gets invoked after flowAction is submitted and response is returned. At this point , you as a developer are conditionally calling the harness the user wants to refresh. In case of Cancel, you are not doing any refresh of the harness.
You are also capturing the name of the flowAction to ensure that this requirement of refresh of Harness is present only for a given flowAction.

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

0% 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?

Want to help us improve this content?

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
Contact us