Not able to insert core_company table record into servicenow through Scripted REST API.

Devi12
Giga Guru

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:

find_real_file.png

1 REPLY 1

RAHUL YADAV9
Mega Guru
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.