synchronous glideajax call for scoped application

pratapdalai
Tera Contributor

Please make suggestions for getXMLwait() alternatives for bespoke applications. GetXMLwait cannot be used for scoped applications, according to the documentation.
I'm working on a need where, when the Status field changes, a GlideAjax call will be made. When the call returns, the response value will be provided to the GlideModal window.
To make the glideajax call synchronous, I need advice.

 

Thank you,

Pratap

6 REPLIES 6

Rahul Kumar17
Tera Guru

Hi,

var ga = new GlideAjax('MyScriptInclude');
ga.addParam('sysparm_name', 'myFunction');
ga.addParam('param1', 'value1');
ga.getXML(function(response) {
  var answer = response.responseXML.documentElement.getAttribute("answer");
  // Do something with the response value
}, true);

 

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar

Ankur Bawiskar
Tera Patron
Tera Patron

@pratapdalai 

getXMLWait() is not supported in scoped app

refer this link for alternative for getXMLWait() in scoped app

https://community.servicenow.com/community?id=community_article&sys_id=ecdc6665dbd0dbc01dcaf3231f961... 

https://community.servicenow.com/community?id=community_question&sys_id=d9348729dbd8dbc01dcaf3231f96... 

https://community.servicenow.com/community?id=community_article&sys_id=e37f2072db9fd0103daa1ea668961... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

pratapdalai
Tera Contributor

@Chuck Tomasi  Could you please suggest a solution here 

@pratapdalai 

Did you get a chance to check my above links?

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