- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 11:22 AM
Hi,
I am getting records from another instance and storing in custom table using GET Api in scheduled job and set it to run in every 60mins. I want a ui action to be created in list view of custom table so user can click on the button to get the updated records. How can i do that.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 01:51 PM
Another possible solution would be to directly have your REST Call on a function on your script include, then you can simply call your function from the UI Action and update the records based on the returned response.
Thanks & Best regards,
Medi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 06:19 AM - edited 03-12-2025 06:22 AM
Hi @Medi C
I am trying with script include. I am getting response from script include but not entering into the UI Action script. Script as follows
Script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 06:31 AM
did log from script include come?
try this
function restCall() {
var ga = new GlideAjax('Script Include Name');
ga.addParam('sysparm_name', 'Function');
ga.getXMLAnswer(function(answer) {
alert(answer);
});
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 06:36 AM - edited 03-12-2025 06:42 AM
Hello @Ankur Bawiskar
I am getting alert and UI action is triggering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 06:58 AM
did script include trigger? what came in log for this line?
gs.log('test data :'+prsData);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 07:03 AM
Hello @Ankur Bawiskar
I am getting response body from the target instance. I am trying to update the response in my custom table using the following script
