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

'Close' is not releasing the case lock

SA-15788

Summary



When running the app on an iPad, if you click the Close button from the case header, it is not releasing the lock from the case. This occurs only on mobile app, not via browser on the same tablet.


Error Messages



Not Applicable


Steps to Reproduce

  1. Run app on iPad
  2. Open a case
  3. Modify the case (to acquire a lock on it)
  4. Click the "Close" button in the case header
  5. Try to open the same case from another session


Root Cause



A defect in Pegasystems’ code or rules: In AutoClose (Work-) section, there is a check for a hybrid client which is failing and hence the case is not getting closed. 

Resolution



Perform the following local-change: 

In AutoClose (Work-) section, provide the below code:

<SCRIPT> 
var temp=parent.frames.RunFlowMain; 
pega.u.d.attachOnload(function(){ 
var isNativeSDK = (navigator.userAgent.toLowerCase().indexOf('pegamobilesdk') != -1);
/*@TODO re-factor this statement, so that this comes here pre-calculated from a better place*/ 
var isHC = (navigator.userAgent.toLowerCase().indexOf('ampwebcontrol') != -1); 

if(isHC) { 
setTimeout(function() { doClose();}, 200); 
}
else if(desktopenvironmentscript_isWindowOnDesignerDesktop(self) || isNativeSDK) { 
    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 January 31, 2016 - Updated October 8, 2020

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