UI Builder - Related List Refresh Event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 01:50 AM - edited 07-12-2024 01:54 AM
Hello,
I currently have a problem with the events in the UI Builder.
We have developed a Related List Action (Declarative Action) that opens a UIB page.
On the UIB page, the agent can select some parameters and call a data resource that triggers an API to add records to the related list. After successfully completing this process, the modal is automatically closed. If we change the data on the server side, the related list will not show the new records and the agent will have to update the related list manually.
To skip this step, we want to update the related list automatically.
For this purpose, we have implemented a UX client script that runs after the data resource is successful, but it does not trigger the event 'RECORD#RELATED_LIST_REFRESH_REQUESTED'. Notifications work for example.
Unfortunately, I could not find any documentation on this.
/**
* {params} params
* {api} params.api
* {any} params.event
* {any} params.imports
*/
function handler({
api,
event,
helpers,
imports
}) {
api.emit("RECORD#RELATED_LIST_REFRESH_REQUESTED", {
relatedListName: "invoice_details.u_case_no"
});
}
- The Script is triggered before the Modal is closed
- Im working in the CSM/FSM Configurable Workspace
This is configured in the Page Configuration:
Am I missing something? Does somebody had a similar requirement?
I am grateful for every help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 02:49 PM
Hi Ruslan,
We had a similar requirement and solved it by adding an event handler on the data resource.
- Open the data resource you are using to create the records.
- In the Events tab, add an event mapping for "Data Fetch Succeeded"
- Add the event handler "[Record Page] Related List Refresh Requested - Data resource"
- For the Related list name, dot-walk to to the Related List in Data resource > Record > relatedLists > Select the one you need > value. Your hardcoded value, invoice_details.u_case_no, should also work.
Let me know if this helps!
Thanks,
Valeria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 02:00 AM
Hi Valeria,
thanks for your answer!
Even though it looks like the way to go its not working on our platform.
I setup the Form Controller and I'm also referencing the value field with the related list name but nothing happens on the related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 02:04 AM
Hello Ruslan,
Did you find any solution to this ?
I'm stuck at the exact same spot as your original query where using a modal to bulk update records and on hitting submit the modal closes, but I'm unable to refresh the related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 06:50 AM
Hi Mukul,
unfortunately not. After our upgrade we started to check again, but it's still not refreshing anything.
In case we resolve this, I will update this post. Please also let me know when you find anything.