Record Watcher in UI Builder not refreshing data resource
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi All,
So I have created a custom dashboard in UI Builder to display some tiles using a repeater and card base containers. The repeater gets data from a lookup multiple records data resource configured to query the cmdb_ci_service_group table with condition set to only look at records with a specific Tag and returns the Severity field. There is a Header component and highlighted value component that are data bound to the data from this data resource. I then set a record watcher data resource to watch the cmdb_ci_service_group table with same condition set, so it is only watching the same records for changes. I have an event setup to REFRESH the Lookup data resource when it receives a message that there is a change to the record, specifically the severity value changes. After this is all setup, the refresh does not seem to work when I manually update the severity to test. I have tried to set the condition to be Severity>Changes, but Changes is not an option. Not sure how to set the condition to watch specifically the change in the Severity value. Any ideas out there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @estierle1,
Use Scoped API Proxy :
Instead of calling /api/now/... directly from the sandboxed page, create a Scripted REST API (or a custom endpoint) in your instance that the page can call through a ServiceNow provided proxy (spProxy).
1) Inside the sandbox, use $http or spUtil.get to call your backend proxy.
2) The proxy makes the server-side call, so the sandbox restrictions are bypassed.
3) This way you keep sandbox enabled and postMessage continues to work.
If my response helped please mark it as correct,
BR,
Rohan