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

AutoClose on CPM Tabbed Navigation does not work

SA-10255

Summary



AutoClose on CPM Tabbed Navigation does not work.

In the CPM application, upon flow completion the service request tab within the interaction is supposed to automatically close. Tracer correctly indicates that the section Work-.AutoClose loads correctly, however, the tab does not automatically close and displays a blank area. Upon troubleshooting, there is a problem with the scriptwebwb • pega_cpm_tabbedInterface • js where the function removeWorkTabFromWork is returning incorrect ID. It is supposed to return the tab ID for the service request, but instead returns the parent tab ID (interaction).


Error Messages



Not Applicable

Steps to Reproduce



1. Launch a service request.
2. Complete the flow.

Root Cause



The root cause of this problem is a defect in Pegasystems code. The PegaCA-Work-Interaction and Work- AutoClose sections need to be updated to work with Pega 7.1.6.

Resolution



This issue is resolved through the following Local-change: 
Modify the two AutoClose section rules to resolve the issue. You can make these changes in the required ruleset version using the below code.

PegaCA-Work-Interaction.AutoClose

<SCRIPT>
var temp=parent.frames.RunFlowMain;
pega.u.d.attachOnload(function(){
    if(desktopenvironmentscript_isWindowOnDesignerDesktop(self))
    {
            if( pega.cpm) 
                if (pega.cpm.tabbedInterface)
                 pega.cpm.tabbedInterface.removeTabCallFromInInteraction(document.body,false);
               
            if(temp==null)
               {  
            doClose();
               } 
               else{
                document.write("<br><h3 style='color:#336699;'>This screen is only displayed when recording and playing back flows using AutoTesting; normally it will self-close.</h3>");
               }
    }
    else{
        self.close();
    }
});
</SCRIPT>


Work- AutoClose

<SCRIPT>
var temp=parent.frames.RunFlowMain;
pega.u.d.attachOnload(function(){
    if(desktopenvironmentscript_isWindowOnDesignerDesktop(self))
    {
            if( pega.cpm) 
                if (pega.cpm.tabbedInterface)
                 pega.cpm.tabbedInterface.removeWorkTabFromWork(document.body,false);
               
            if(temp==null)
               {  
            doClose();
               } 
               else{
                document.write("<br><h3 style='color:#336699;'>This screen is only displayed when recording and playing back flows using AutoTesting; normally it will self-close.</h3>");
               }
    }
    else{
        self.close();
    }
});
</SCRIPT>

Published June 12, 2015 - Updated December 2, 2021

Was this useful?

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