Support Article

Attachments are not displayed in main section

SA-18965

Summary



Attachments are not displayed in the main (parent) section when attached using the Advanced link.

Error Messages



Not Applicable

Steps to Reproduce

1. Click on the Attachments link.
2. Click on Add, and attach a file with .txt extension.
3. Click on Attach button and then Close.

Root Cause



When the Advanced link is clicked, a new window is opened from which a modal dailog is opened. On closing, the parent section is not refreshed.

Resolution



As a local-change refresh the main section on closing the child window.

1. In the Attachments section, add another section known as RefreshAttachments.
​2. Navigate to RefreshAttachments, and uncheck the Auto-generated Check Box under HTML tab.
        Add the following code snippet in the HTML source.
        <script>
        pega.util.Event.addListener(window,"unload",function(){
        pega.desktop.sendEvent("DesktopMouseClose");
        });
        </script>​

3. Open the Rule UserWorkForm of Ruleset Pega-UIEngine and add the code snippet given below.
        <script>
        function testingFun(){
        pega.u.d.refreshSection("pyCaseAttachmentsWrapper");
        }
        pega.desktop.registerEventListener("DesktopMouseClose", testingFun);
          </script>

Published February 9, 2016 - Updated October 8, 2020


100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.