- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 03:47 AM
Hi Ram,
getXMLWait() - Wait till the time we get input from server & then move ahead.
For instance when you are trying to retrieve value of the field & after getting value then only it should proceed to next step like comparing it with user input.
getXML() - If you are retrieving some data from server and next tasks does not depend on what you are retrieving from server. Ideally, used so as to avoid any performance load.
For additional information you may refer link.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 03:48 AM
getXML(callback) is ASYNChronous
getXMLwait() is SYNChronous
Explaination:-
- getXMLWait() is used when you want to halt processing until the results are returned. This will halt everything and wait for it to finish and return the results
- getXML(callback) is used when you want processing to continue, even if the results have not been returned
What you plan to do will help you decide which will work best. In our instance, we have had situations where we do want to wait for the results before continuing (even though it will take a few seconds). However, for the most part, we use getXML and a callback function for the vast majority of our uses.
Note:- getXML (aSynchronous) is the preferred/recommended method.
Thanks,
Saikiran Guduri (NOW)
Associate Certificate Engineer | ServiceNow Store Apps
(Please mark the answer as correct answer/helpful/accept the solution if it helps)
