How to call a server script and return Json object from Ui builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 08:13 AM
I am trying to find a way that is similar to server script in service portal but in UI builder. I have seen some suggestions to use Data broker server script. What I am basically trying to do is use GlideRecord to add new record using Data broker server script. The data that i pass to it in the format of JSON and i want to return a JSON that contains the result and sysId of newly created record. I was not able to do it . Is there any similar example to this approach ?
- Labels:
-
Now Experience UI Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 09:13 AM
Hi Louay,
You can execute server side javascript using a transform data resource in UI Builder. If you take a look at the second video in this blog post it may help with that. https://developer.servicenow.com/blog.do?p=/post/quebec-ui-builder-data-resources/
(Don't forget to add an ACL if you've created your own data resource)