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

Visibility When rule and Section Refresh do not work

SA-88050

Summary



A section is configured such that an auto refresh invokes an activity.
In the activity, a SOAP Service is invoked. Based on the response, the value of a flag is set. Based on value  of the flag, the Visibility When condition of some layouts is set. During auto refresh, the Visibility When condition is executed as True; however, the section is not refreshed and the layout is not visible.


Error Messages



Not Applicable


Steps to Reproduce

  1. Configure a section with the script in the HTML source to auto refresh the parent section.
  2. Refer this Section rule in a different section.
  3. In the parent section, refer the layouts with Visibility conditions.
  4. In the auto-refresh activity, set the flag such that the Visibility condition of the layout is true. After the auto-refresh activity is executed, the Visibility When condition is true in the Tracer, however, the section is not refreshed and the layout is not visible.


Root Cause



An issue in the custom application code or rules: User configuration.

The below script is referred in the auto-refresh section which does not work:


<script>
    $(document).ready(
        function(){
            setTimeout(
                function(){
                    pega.u.d.reloadSection(pega.u.d.getSectionByName("ServiceActions", "", ""), "ErrorAutoRefresh", "" , false, true, -1, false, event);
                },
                15000);
            return(false);
        }
    );
</script>



Resolution



Perform the following local-change:

Use the below script in the auto-refresh section as suggested in the JavaScript API documentation:

<script>
    $(document).ready(
        function(){
            setTimeout(
                function(){
                    pega.api.ui.actions.refreshSection({
                        section:"ServiceActions",
                        submitOnRefresh:false,
                        activity:{
                            name: "MeigasAutoRefresh"
                        }
                    });
                }
                ,15000);
            }
</script>

Published 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