Business Rule to Scripted Rest API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 07:22 AM
Existing scenario: Client is calling Server with server.get method. Servicenow responds the call with a JSON which contains a lot of information including the $$uiNotifications. Client then parses the $$uiNotifications array and displays all the error messages.
I need to change this communication channel to REST API. So now, client will call the API and API will respond with whatever data is required. How can I listen to the $$uiNotifications from the API and send it to the client?
In the existing scenario, I believe, whatever errors Business Rules throws, it will be present in the $$uiNotifications array. Likewise, I need the same stuff from API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 01:58 AM
Hi @Arun Kumar P1 , I am also trying to address similar use case where I want to display the error message raised by business rule in Scripted REST API response. Could you please more details around the solution which worked for you in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 02:04 AM
HI @Arun Kumar P1,
I am trying to implement similar use-case where the business rule error message is added in the Scripted REST API response. Could you please help me by sharing the details about the solution which worked for you.