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

Confirmation message of a deleted item does not display

SA-48888

Summary



After configuring the 'Display confirmation message' on a 'Delete item' action, the confirmation message does not display.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a section (Section A) with a repeating section layout.
  2. Add another section (Section B) to the repeating layout. Add a Trash Can icon to Section B.
  3. On the icon, define an action set (OnClick) with 'Delete item' action.
  4. In the details, select the 'Display confirmation message' checkbox .
  5. Attach section A to a case and run the case. Add one or more items to the repeating layout.
  6. Click the Trash Can icon for one of the items. The confirmation dialog does not display.


Root Cause



The 'Display confirmation message' is not handled correctly .

Resolution



Perform the following local-change:

Include the below script in the UserWorkForm,
<script>
function removeFromRepeatSource(D) {
if(window.confirm("Are you sure to delete")){
var C = pega.ui.DataRepeaterUtils.getLayoutType(D);
if (C == "grid") {
doGridAction(D, "DELETE")
} else {
if (C == "repeat-layout") {
var B = pega.ui.DataRepeaterUtils.getAbsoluteDataSourceFromEvent(D);
var E = B.dataSource;
var F = B.rowIndex;
var A = B.domIndex;
B.sectionContext = pega.ui.DataRepeaterUtils.getRepeatLayoutSectionContext(D);
if (pega.u.d.ServerProxy.isDestinationLocal()) {pega.ui.template.DataRepeater.removeFromRepeatSource(B)
} else {
pega.desktop.DataRepeater.removeFromRepeatSource(B)
}
}
}
}
}
</script>


Published March 29, 2018 - Updated October 8, 2020

Was this useful?

20% 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