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
07-15-2025 12:10 PM
I'm able to create a new client script and use api.emit() to get a related list to refresh. I execute the client script on "Operation Succeeded" from my data resource.
Hope this helps!
function handler({api, event, helpers, imports}) {
api.emit(
"RECORD#RELATED_LIST_REFRESH_REQUESTED", {
"relatedListName": "REL:a4de018f476aa610280b4080236d43d7"
}
);
}