- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2024 02:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2024 01:48 AM
Couple issues
request.body isn't the actual content but an object of different ways to access the body. request.body.data is likely what you're wanting.
Also, on the GlideRecord, you need to pass in the table name as new GlideRecord('incident')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 01:47 AM
Can you log out whats request.body.data contains ? - check if anything is received
Can you provide the exact error you get - its hard to figure out when its just "500".
You should get a message with whats failing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2024 01:48 AM
Couple issues
request.body isn't the actual content but an object of different ways to access the body. request.body.data is likely what you're wanting.
Also, on the GlideRecord, you need to pass in the table name as new GlideRecord('incident')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 01:41 AM
despite of modifications I am getting same 500 as response code @Kieran Anson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 01:47 AM
Can you log out whats request.body.data contains ? - check if anything is received
Can you provide the exact error you get - its hard to figure out when its just "500".
You should get a message with whats failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 02:19 AM
the above is the error message I got and when I tried to print body data in the scripted rest api before parse its showing record object after parse the log not at all coming to log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 03:09 AM
Well, request.body.data is an obejct - so you dont need to "JSON.parse()"
You can log out with; gs.log('Body data: ' + JSON.stringify(request.body.data))
As for the error message - that really doesnt help us