- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2024 10:24 AM
I have built outbound integration using REST Messages, and the HTTPS status is 200. It's perfect, but I need a particular field to show up in the response. How can I do that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 07:34 AM
Hi @SaitejaN ,
you can use code like below to get the field value from response.
In your rest message set response type as JSON/Application
var response = responseObject.getBody();
var responseJson = JSON.parse(response);
var shortDescription = responseJson.field_name;
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 08:31 AM - edited ‎11-20-2024 08:34 AM
Hi @SaitejaN
Use any multi text fields like Description, Short Description or create a custom field with the below script provided by Runjay .
Mark it Helpful and Accept Solution!! If this helps you to understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 07:34 AM
Hi @SaitejaN ,
you can use code like below to get the field value from response.
In your rest message set response type as JSON/Application
var response = responseObject.getBody();
var responseJson = JSON.parse(response);
var shortDescription = responseJson.field_name;
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 08:31 AM - edited ‎11-20-2024 08:34 AM
Hi @SaitejaN
Use any multi text fields like Description, Short Description or create a custom field with the below script provided by Runjay .
Mark it Helpful and Accept Solution!! If this helps you to understand.