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

Case displays on a new window

SA-90465

Summary

An email contains a case link. Case opens in the Review mode on clicking the link. When user clicks Begin on the screen, a new window opens on which the case displays in the Perform mode. The case must display on the same window in the Perform mode.


Error Messages

Not Applicable


Steps to Reproduce

  1. Click the link sent through the email
  2. Log in to the application
  3. Click Begin


Root Cause



A defect in Pegasystems’ code or rules.

Resolution



Perform the following local-change: 
Launch a portal and perform open assignment by following the steps below:


1) Invoke beginWork by clicking Begin with pzInsKey as param

2) Add the below script to the UserWorkForm:

function beginWork(Key) {
    var oSafeUrlClose = SafeURL_createFromURL(pega.u.d.url);
    oSafeUrlClose.put("pyActivity", "DoClose");
    oSafeUrlClose.put("retainLock", "false");
    oSafeUrlClose.put("dcCleanup", "true");
    pega.u.d.asyncRequest("GET", oSafeUrlClose, {success: function() {
      var oSafeUrl = SafeURL_createFromURL(pega.u.d.url);   
      if($(".SmuckerHeader", parent.document).length){
      pega.desktop.openAssignment(Key, "", "", "", "true", "","");
    }else{ 
    /*oSafeUrl.put("pyActivity", "@baseclass.doUIAction");
    oSafeUrl.put("action", "openAssignment");
    oSafeUrl.put("pzSkinName", "PM");
    oSafeUrl.put("key", encodeURIComponent(Key));
    window.location = oSafeUrl.toURL();*/
    var location = "";
    location ="pyActivity=Data-Portal.ShowSelectedPortal&portal=pyCaseWorker&Name= pyCaseWorker&pzSkinName=&developer=false&ThreadName=OpenPortal_pyCaseWorker&launchPortal=true&portalThreadName=STANDARD&portalName=Developer";
    location = encodeURIComponent(location);
    oSafeUrl.put("pyActivity", "Embed-PortalLayout.RedirectAndRun");
    oSafeUrl.put("ThreadName", "OpenPortal_pyCaseWorker");
    oSafeUrl.put("beginWork", Key);
    oSafeUrl.put("Location", location);
    window.location = oSafeUrl.toURL();
  }
    }});
  


3) Add the below HTML fragment to the label on the portal header:
<pega:include name="OnloadJS" /> 

<script>
  $(document).ready(function(){
    var location = window.location;
    var url = new URL(location.href);
    var Key = url.searchParams.get("beginWork");
    if(Key){
      setTimeout(function(){pega.desktop.openAssignment(Key, "", "", "", "true", "", "");}, 3000);    
    }
  });
</script> 

Published October 11, 2019 - 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