Catalog item - calling REST method json name value pair

levino
Giga Guru

Hi there

i have a catalog item which calls a REST api, in the http method i have JSON name value pair

 

one of the values  i need to pass is in this format

\\telcom\data\al\shared11\Tyco

 

when i try and test it using the http method it comes up with object of intance not to be found, if i remove that name value pair it goes thru fine

 

do i need to do something to retain the backslash, is it a onclient submit script since it will be eventually passed from a cat item

Thanks

Levino

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@levino 

you can escape the character

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

View solution in original post

6 REPLIES 6

Vasantharajan N
Giga Sage
Giga Sage

@levino - Please include the payload you are trying and response you are getting, which helps community members to digest and provide solution for your issue.


Thanks & Regards,
Vasanth

Ankur Bawiskar
Tera Patron
Tera Patron

@levino 

you can escape the character

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

Hi Ankur

please can you provide me a example ,i probably would need to it in a onsubmit client script as users would be typing in something similar

\\telcom\data\ak\shared11\Tyco

Thanks

Levino

@levino 

handle it in server side using setStringParameterNoEscape()

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0821441 

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