Support Article
Onclick of Previous/Next button of ModalDialog error is coming
SA-6324
Summary
Onclick of Previous/Next button of Modal dialog window "Invalid argument" error is coming on screen.
Facing this issue only on Review harness but not on Perform harness.
Error Messages
IE Error description : Invalid argument
Steps to Reproduce
1) Open Comments tab of a work object having multiple comments in grid.
2) Double click on any of the row.
3) Modal Dialog window having details of selected comment gets open.
4) Now click Previous or Next (which ever is available/enable on screen) button.
5) Popup window having "IE Error description : Invalid argument" error gets displayed.
Root Cause
It was found that this.isLocked boolean was coming as true in review harness .
This was causing the goToNext function to enter an if block and return at the end of the if block.
The generated response was improper because of this early exit of the function.
s a result, the response handling functions were throwing js errors.
Resolution
Issues is resolved through below local change and suggested to create a non-auto generated section and include this section in the same section that contains the grid. (Infact below the grid layout).
We have also overridden the goToNext and goToPrevious functions in a way that even if later there is any hotfix, it will still be called .
<script>
var origNext;
var origPrev;
if(!origNext)
{
origNext = pega.ui.grid.prototype.goToNext;
}
if(!origPrev){
origPrev = pega.ui.grid.prototype.goToPrevious ;
}
pega.ui.grid.prototype.goToNext = function(e, templateName)
{
this.isLocked=false;
origNext.call(this,event,templateName);
};
pega.ui.grid.prototype.goToPrevious= function(e, templateName)
{
this.isLocked=false;
origPrev.call(this,event,templateName);
};
</script>
Published January 31, 2016 - 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.