Hayo Lubbers
Kilo Sage

getXML() or getXMLAnswer() will process your request a-synchronously.

getXMLWait() doesn't process any other requests, until the response is processed.

 

Please only use getXMLWait() if really necessary, since it holds the user interaction until the reponse is processed.

 

More information at : https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideAjaxAPI#r_GLAX-getXML_S

 

getXML(Function callback)
Sends the server a request to execute the method and parameters associated with this GlideAjax object.
The server processes the request asynchronously and -- when ready -- returns the results via the function specified as the callback_function.

 

getXMLAnswer(Function callback, Object additionalParam, Object responseParam)
Calls the processor asynchronously and gets the answer element of the response in XML format.

 

getXMLWait()
Sends the server a request to execute the method and parameters associated with this GlideAjax object.
The server processes the request synchronously and will not process further requests from the client until finished. To retrieve the results, the client must call getAnswer(). Using getXMLWait() ensures the order of execution, but can cause the application to seem unresponsive, significantly degrading the user experience of any application that uses it. We recommend using getXML() instead.
Note: getXMLWait() is not available to scoped applications.