The CreatorCon Call for Content is officially open! Get started here.

We have a scripted rest API post method which gets a request from another API, based on the request we get we have to do some validation (I used a script include by calling it from scripted rest api & tried to update some fields in a table.) it's not

krishna26
Kilo Expert

Hi,

Urgent Help

We have a scripted rest API post method which gets a request from another API, based on the request we get we have to do some validation (I used a script include by calling it from scripted rest api & tried to update some fields in a table.) but it's not working. it's not working when i tried to do the same thing by declaring the variables it's working fine.

Scripted Rest API : find_real_file.png

POST method

find_real_file.png

 

Script Include

find_real_file.png

Logs 

find_real_file.png

Table

 

find_real_file.png

find_real_file.png

I was wondering why the values are not being set on the table even the script is written correct. to check if the script works at all .... created a sampletest_pvk function . The same thing works i.e. values are set (from test_pvk function) .Could anyone help on this please 

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

same question has been asked on below thread. 

 

https://community.servicenow.com/community?id=community_question&sys_id=2a9524261bcb0810a59033f2cd4b...

 

answer has been mentioned on this thread. 

 

Kindly mark the answer as correct and close this thread. 

 

View solution in original post

5 REPLIES 5

humbly conveying my appreciation for your help.