Scripted REST API POST method not inserting record into core_company table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 02:33 AM
Hi,
I have created a scripted REST API POST method to insert a record into "core_company" table from third party. When I am testing in POSTMAN and Explore REST API It is showing status message as "200". But the record is not inserting into core_company table. How can I fix thie issue?
I am attaching the script I have used, may be this is causing the issue. Can anyone suggest how can I modify below script to insert the record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 05:44 AM
Hi,
The error you are receiving is for authentication, make sure you are using correct user_id and pwd.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 05:53 AM
Hi anil,
The password is correct, I reset it and tried it showing the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 05:44 AM
Hi,
as per your script you are not inserting but querying and sharing the details of field as response
So didn't get your question on updating and what's not working
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 05:50 AM
Hi ankur,
How can I insert the data, can you please provide me the sample method to insert data.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 08:04 AM
Hi,
what's your actual question?
You want to insert or want to fetch?
Your original question says you want to insert but script you shared is for fetching the data?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader