- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 04:55 PM
Hi
I'm trying to obtain the incidentNumber field from the following REST Message response
Using the following code but can get it to work
I dont get a response back
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:21 PM - edited 11-30-2023 06:22 PM
N wht abt this
var incNum = responseObj.incident;
gs.addInfoMessage('Response '+incNum);
Does it give u objectObject
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 05:04 PM
Hi @eliasdimopoulos ,
Can u try like this
var responseObj = JSON.parse(responseBody);
var incNum = responseObj.incident.incidentNumber;
gs.addInfoMessage('Response '+incNum);
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 05:35 PM
Thanks Danish for your response
When I try the suggested I get Response undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:21 PM - edited 11-30-2023 06:22 PM
N wht abt this
var incNum = responseObj.incident;
gs.addInfoMessage('Response '+incNum);
Does it give u objectObject
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:02 PM
Hi Danish
I get undefined again
I also tried changing to the following