Support Article
Delete from grid repeat leaves added item when submitted
SA-13453
Summary
In a grid repeat, items that are added then deleted immediately, reappears in the grid after it is submitted.
Error Messages
Not applicable.
Steps to Reproduce
1) Bring up the grid.
2) Add an item.
3) Add a second item.
4) Delete the second item.
5) Submit the grid. The deleted item reappears.
Root Cause
A defect in Pegasystems’ code or rules: The delete was not removing the item from the UI data structure, so when the grid was submitted, the item is re-added to the clipboard.
Resolution
Perform the following local-change:
Add the following code to the UserWorkForm HTML fragment:
<script>
pega.ui.Doc.prototype.deleteModalHeader = function() {
var hdiv = document.getElementById("modaldialog_hd");
if(hdiv){
if (hdiv.parentNode && (hdiv.parentNode == pega.u.d.modalDialog.innerElement))
pega.u.d.modalDialog.innerElement.removeChild(hdiv);
}
}
</script>
Published August 31, 2015 - 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.