Support Article
JavaScript functions to close modal dialog do not work
SA-52156
Summary
A pop-up window displays on double click of a repeating grid. Clicking Cancel on this window displays a confirmation message. Clicking OK on the confirmation window does not close it.
Error Messages
Not Applicable
Steps to Reproduce
- Create a case with repeat grid in the section
- Click add item in the account grid
- Click Cancel on modal dialog
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
1. Change the CloseWindow function:
function CloseWindow(event)
{
var r = confirm( "Are you sure you want to close? Any changes will be discarded.");
if ( r == true) {
pega.u.d.activeGrid.cancelModal(event);
}
}
2. Add a parameter (script:event) to the runScript of the Cancel button.
Published March 5, 2018 - 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.