want to know whats wrong in my code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 02:26 AM
I am learning about serviceNow integeration , and fetching api from outside api using serviceNow Outbound Integration using request and made a new field on want to add the api details using script in Business rule , but i don't know why its not working , I am attaching the important screenshots here can someone help.
```
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 04:43 AM
Hello @mishrarakes, Thanks for the response. as mentioned others too, can you please try below steps:
1- change var response = r.executeAsync(); to var response = r.execute();
2- print the response whether you receive it fine - gs.info(responseBody)
3 - if #2 is not printing anything, you can try to debug the API call and will understand the problem. you can try postman too if you dont receive response back. you can avoid this step if #2 works fine
4 - If all the above works fine and you find problem in updating the record, then you can try to comment out current.update()
Regards,
Nishant