Update record JSON object in the URL

YashKedia
Kilo Explorer

I am trying to update the record in the ServiceNow instance by using the URL as mentioned inn the wiki http://wiki.servicenow.com/index.php?title=JSONv2_Web_Service, but unfortunately it is not happening.

 

 

However, i am able to insert the record but the update operation doesn't happen. here i am trying to update all the records in the table, still it not happening.

 

URL-> https://mssandbox.service-now.com/u_test_employee.do?JSON&sysparm_action=update&sysparm_query=https://mssandbox.service-now.com/u_test_employee.do?JSON&sysparm_action=update&sysparm_query=

 

I have checked the call in the Developer tools of chrome (Network section), it looks good. could see the url and JSON object binded with data.

 

 

Any ideas or suggestion is appreciated.

 

 

Thanks

4 REPLIES 4

AnishSasidharan
Mega Expert

Can you paste the exact URL which you are using to update ?.   You can perform the update action by passing the encoded query string.



Is that you are passing encoded query string and still facing issue?



Thanks


As part of Dublin release, the JSON webservice plugin is replaced by the JSONv2 processor.




Try below link and i am not sure you can able to send the object file in the URL to update. I can assure the direct link updation.


Might be you have to write some custom code to manipulate the data objects in servicenow.   Why can't you pass the data object to processor and perform manipulation?.. If you using SOAP, i could recommend to use scripted web service but using JSON there is no option rather using processor.




var responsePromise = $http.post('https://mssandbox.service-now.com/u_test_employee.do?JSONv2&sysparm_query=u_number=EMP0001102&syspar...', dataObj, {});




Thanks




I am able to insert the record with same JSON object embedded in the URL. just the difference is syparam_action=insert.