Support Article
Smart label clears the page messages
SA-17277
Summary
If there is a page message on the screen, and user does a hover on a link, the smart label appears and removes the message from the page.
So user does not get to see the error message.
This is a upgrade project. In PRPC 5.4, it used to work but after upgrading in Pega 7.1.8 and this functionality is not working.
Error Messages
No error message.
Steps to Reproduce
1. Open a case in perform harness.
2. Click on any flow action.
3. Submit form such that it does not get successfully submitted and displays a page message.
4. Now, hover over any link that has smart label.
ROOT CAUSE
Reload section which is caused by smartinfo, that hides the error messages.
Resolution
Local change is to override clearErrorTables function such that it does not clear error message in case of ReloadSection for SmartInfo, as per your requirement. It can be achieved using below script in UserWorkForm:
<script>
pega.ui.Doc.prototype.clearErrorTables = function(){
try{
var isSmartInfo = arguments.callee.caller.caller.caller.arguments[4];
if(isSmartInfo){
return;
}
}catch(ex){}
var errorTAble = pega.util.Dom.getElementsById("ERRORTABLE", document);
if (errorTAble) {
var len_errorTable = errorTAble.length; //for performance reasons
/*BUG-110460 - In case of custom error section, instead of removing errorTAble, removing the innerHTML of the span */
for (i = 0; i < len_errorTable; i++) {
if(pega.u.d.formErrorType == "NONE"){
var spanEle = pega.util.Dom.getElementsById("ERRORMESSAGES_ALL",errorTAble[i]);
while(spanEle.lastChild){
spanEle.removeChild(spanEle.lastChild);
}
}else{
errorTAble[i].parentNode.removeChild(errorTAble[i]);
}
}
}
var errorTableSpacer = pega.util.Dom.getElementsById("ErrorTableSpacer", document)
if (errorTableSpacer) {
var len_errorTableSpacer = errorTableSpacer.length; //for performance reasons
for (i = 0; i < len_errorTableSpacer; i++) {
errorTableSpacer[i].style.display = "none";
}
}
}
</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.