Discussion

143
Views
Balasubramanian Durai (durab)
PEGA
Principal Software Engineer
Pegasystems Inc.
IN
durab Member since 2016 9 posts
PEGA
Posted: February 24, 2021
Last activity: February 24, 2021
Posted: 24 Feb 2021 6:43 EST
Last activity: 24 Feb 2021 13:07 EST

Refreshing files and documents widget in Theme Cosmos

This document will explain about how to refresh files and documents widget in theme cosmos when attachments are added through flow actions and case processing.

Use case 1: Refreshing the widget when adding attachments using “pyAttachContent” control in a flow action without submitting the case

Attachment control in flow action

After adding the attachment and not submitting the case, the files and documents widget will not be refreshed as both the sections are present in different thread context.

To refresh the widget after the attachment before submitting the case, please follow the steps below:

  1. Open the property panel of attach control and navigate to Actions tab
  2. Add a click action and use “Run script”
  3. Add the " pega.desktop.infinity.refreshCaseSections" and pass the section name “pyCaseRelatedContent”. The widget will be refreshed.

Adding runscript to refresh the section

 

Use case 2: Refreshing the widget when adding attachments from flow action after submitting the case

Attachment through flow action

When the attachment is being added from a flow action, the section gets rendered in the primary ajax container. After adding the attachment, the widget will be not refreshed as both the sections are in different thread context.

 

To refresh the widget, please follow the steps below

 

1. Navigate and open to pyCaseMainInner section of the case type

2. Navigate to utils region and open “Case Related content”

3 Add the property “.pxUpdateDateTime Changes” condition on the refresh condition and submit.

Refreshing attachment widget when the case gets processed

This will refresh the widget after the attachment case has been submitted.

 

For more refresh strategies in theme cosmos, please see refer this document for more information

https://collaborate.pega.com/discussion/refresh-contents-theme-cosmos

***Edited by Moderator Marissa to add the Developer Knowledge Share tag***
Pega Platform User Experience Cross-Industry Front-End Developer Developer Knowledge Share