Not able to insert core_company table record into servicenow through Scripted REST API.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2022 03:56 AM
Hi,
I have created a Scripted REST API to insert/update data from third party to servicenow, when I tested with Explore REST API, it is showing 200 as status code, but not inserting the data into core company table. Same error is getting through the POSTMAN also. I am not good at scripting. Can anyone suggest corrections in my script I shared below:
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 01:05 PM
Update your code from line no. 6 like below :
var gr= new GlideRecord('core_company);
gr.name=parsedData.name;
gr.status=parsedData.status;
gr.insert();
response.message('Data updated.');
Please mark correct if this helps and let me know in case you need more help with script.