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

Expand/Collapse All Icon does not load Defer loaded DLs



Expand or Collapse action does not work correctly for collapsible Defer Loaded dynamic layouts.

Error Messages

Not Applicable

Steps to Reproduce

  1. Configure a section with multiple dynamic layouts.
  2. Enable Defer Load contents, Display header, and Title in the Layout properties.
  3. Select 'Collapsible' as the Header type.
  4. Deselect 'Expanded on load'.
  5. Add a button in the same section.
  6. Configure the 'Expand/Collapse' action on click.
  7. Launch the portal.
  8. Click the button. The defer loaded content does not load. The 'Loading' text displays.

Root Cause

This behavior is as per Pega product design.

For a collapsible header with Defer Load the section, data is available only when the user clicks on the header manually.


Here’s the explanation for the reported behavior:

On the Expand/Collapse action, the content of the section is not sent to the server. The section content is unavailable until the user clicks the section header. At runtime, if the user clicks the 'Expand the section by clicking the header' and then clicks the button, the Expand or Collapse works correctly. 

As a local-change, implement the custom JavaScript function (Run script) which triggers the Click event on the dynamic layout header at runtime as below,
  1. Add custom class (expand-collapse-DL) in the 'Header CSS class' in the Presetation tab of all dynamic layouts in the section.
  2. Add the below script in the UserWorkForm,

    function expandCollapseDL(param){
        if(param == "expand"){
            jQuery('div.Collapsed .expand-collapse-DL').click();
             jQuery('div.Expanded .expand-collapse-DL').click();

  3. Configure the 'Run Script' action to the button.
  4. Provide the custom function name as expandCollapseDL.

Published April 1, 2020 - 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