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

pxCaseMgrScript JavaScript does not work with a Screen layout

SA-75623

Summary



pxCaseMgrScript is used in the Scripts and Style tab of the harness which has a panel set in it. With the panel set, the review panel expands onClick of any record in the grid. However, when the panel set is converted to a screen layout, the script does not work.


Error Messages



Error in browser console: 

Cannot read property 'layoutObj' of null.


Steps to Reproduce

  1. Create a harness.
  2. Add a Footer screen layout with a grid.
  3. Add the pxCaseMgrScript script in the Script and Style tab.


Root Cause



A backwards compatibility defect in Pegasystems’ code or rules.
The pyCMCases and pxCaseMgrScript sections were designed earlier and support minimum features with some limitations.


Resolution



Perform the following local-change:

Use a custom script file in the pyCMCases harness' Scripts and Styles tab to set the footer height.

Replace this code:


 if (pega.util.Dom.isAncestor(gridDiv, target)) {
      pega.u.d.portal.layoutObj.getUnitByPosition('bottom').expand();
  }


with the below code.

if (pega.util.Dom.isAncestor(gridDiv, target)) {
        $("footer").css("height","200px");
        $("footer").css("background-color","#D6E2F5");    
}

Published March 29, 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