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
- Create a section (Section A) with a repeating section layout.
- Add another section (Section B) to the repeating layout. Add a Trash Can icon to Section B.
- On the icon, define an action set (OnClick) with 'Delete item' action.
- In the details, select the 'Display confirmation message' checkbox .
- Attach section A to a case and run the case. Add one or more items to the repeating layout.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.