- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I'm looking to trigger a refresh on a list component based on an action that occurs in my custom component. I have a dispatch function that contains a payload object. I created a ux event for this dispatch action, I added it to my macroponent and I see this event in the builder UI.
Documentation followed
https://developer.servicenow.com/blog.do?p=/post/quebec-ui-builder-custom-component-events/
https://developer.servicenow.com/blog.do?p=/post/quebec-ui-builder-custom-component-events/
Using the Next Experience inspector chrome extension. I see my event was triggered and has a payload
I would like to look at the payload and see if success is true. If my bool is true then i would want to execute a client script to refresh my list.
function handler({api}) {
api.setState('listRefreshed', {timestamp: Date.now()});
}
I'm having trouble connecting the events. Here is the structure of my page
Where "my component" in the modal is the custom component and "list 2" is a remote table. Upload Document button is a declarative action opening the modal with the custom component.
Any resources on being able to access dispatched events from other components would be very useful. I haven't found much documentation around these.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The issue was i didnt clear the ui builder cache. Once I did that, the events tab was visible on my custom component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The issue was i didnt clear the ui builder cache. Once I did that, the events tab was visible on my custom component.