What is the alternative to getXMLWait() in service portal

Hima Pallela1
Tera Guru

Hi,

I have catalog client scripts where it has getXMLWait(). But in Service Portal its not working. What is the alternative approach/workaround to achieve the same functionality.

Any suggestion is appreciated.

Regards,

Hima Pallela.

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Hima,



I'm aware that getXMLWait() is restricted in scoped application but not sure with Service portal in global scope.


The alternative of getXMLWait() is to use


getXML(callback)


getXMLAnswer(callback)



More info can be found here.


Scoped Applications and Client Scripts: A Primer


Hi Pradeep,



Service Portal is a global scope. But i observed that the client script is not even calling Script Include when i open the catalog item in service portal. But if i open the same Item in ITIL view its working fine. I'm referring the below document where i didn't find getXMLWait().



documentation/client_scripting.md at master · service-portal/documentation · GitHub https://github.com/service-portal/documentation/blob/master/documentation/client_scripting.md#glidea...



Regards,


Hima Pallela


Thank you for the details. Unfortunately, I don't have an instant answer for you. Hopefully someone with an answer will chime in.


siladityamishra
Kilo Contributor

Hi Hima,



Did you figured out the alternative for catalog client scripts where it has getXMLWait() in Service Portal or you are still looking for it.



Regards,


Siladitya