getAnswer coming back as null from getXMLWait

raed1
Giga Contributor

Hey guys,

I am trying this synchronous call example (picture attached below) on a catalog client onSubmission script, however the answer comes back as null. Am I missing something here? I want to use a synchronous call on my forms on the portal, however, I can't seem to get them to work.

find_real_file.png

5 REPLIES 5

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Raes,



  • When creating the script include, you must select the Client callable check box.


Did you do it?



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


raed1
Giga Contributor

Hey Antin,



I did. On further reading it seems that getXMLWait does not work on the portal. Do you know of any alternatives or workarounds?


antin_s
ServiceNow Employee
ServiceNow Employee

Oh. I didn't know you were on Portal. Then, you might have to make a HTTP call to the REST API from the Client controller script. You may call the Table API if it has all the info you want, or you might need to create 'Scripted Web Service' and call.



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


antin_s
ServiceNow Employee
ServiceNow Employee

The below is an example of GET from the OOB Widget - Ticket Conversations



find_real_file.png



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin