Scripted REST API POST method not inserting record into core_company table.

Devi12
Giga Guru

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.

find_real_file.png

11 REPLIES 11

Hi,

The error you are receiving is for authentication, make sure you are using correct user_id and pwd.

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi anil,

The password is correct, I reset it and tried it showing the same error.

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi ankur,

How can I insert the data, can you please provide me the sample method to insert data.

Thank you!

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader