UI Builder: Refresh a custom Data Resource on Comment or WorkNotes update.

Ankit11
Tera Contributor

Hello,

 

Thank you for taking the time to read this.

 

I am working on a requirement where I have created a new UI Page in the contextual Side Panel of the SOW Workspace using #UIBuilder. I am facing a challenge where I need to refresh a Data Source in the UI Page whenever worknotes or comments are updated in the parent record page.

 

Currently, I am using @Data.record.form.fields.comment.value and @Data.record.lastRefreshed.timestamp in the Page Property, and I am refreshing the data resource on the Page Property Update event. While this approach refreshes the data resource for the user who adds the comment, it does not work for other users viewing the same incident.

My Assumption:

  • When a user adds a comment, the comment field on the form changes, triggering the data refresh for that user.
  • However, for other users, since the comment is directly added to the Activity Stream, the comment field or the lastRefreshed value on the form does not update, preventing the data refresh for those users.

I also tried using @Data.record.activityStreams.events.length, assuming the event array would update when a comment is added to the Activity Stream, but it seems the event array only updates upon a page refresh.

 

Requirement: I want the data resource to refresh automatically for all users viewing the incident when a comment or work note is added, in real time, just as it updates in the Activity Stream.

 

I would greatly appreciate any suggestions or guidance on how to achieve this.

Thank you!

0 REPLIES 0