Access to getXMLWait is not available in scoped applications , what is workaround ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2015 01:03 PM
I am trying to query related list on submit and i am getting 'Access to getXMLWait is not available in scoped applications' infomessage on the form.
I am trying to do something similar to Make entry in related list mandatory
any workarounds?
- Labels:
-
User Interface (UI)
- 9,489 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2015 01:28 PM
In your script include, you must fully qualify the AbstractAjaxProcessor object, which I bolded below.
var LightsAPI = Class.create();
LightsAPI.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
type: 'LightsAPI'
});
(example taken from http://wiki.servicenow.com/index.php?title=Scripting_in_Scoped_Applications#gsc.tab=0)
Give that a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2015 11:40 AM
I am having the same issue and tried your solution but that did not work for me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 01:49 PM
I am also having the same issue. I am using getXMLWait to process date validations on the server by calling a script include from a client script. The synchronous "wait" function is recommended to wait for a response before continuing. Any idea if this will be available again in Fuji?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 02:27 PM
Hi srnewbie,
we are experiencing the same issue. We were using getXMLWait for onSubmit validation, which doesn't work asynchronously. However we didn't find a proper workaround. We submitted an incident with ServiceNow on the 21st of May but there has not yet been a solution.
The workaround they provided was:
I have received quick response from Development about the scope of global API methods.
The development has confirmed that getXMLWait()/synchronous methods are NOT allowed in the application scopes.
The suggestion is to use getXML(callback) / asychronous method in a scoped application. As this is NOT supported at the application layer there is no work around to override it. I understand from you that getXMLWait() is essential for your business logic, may I suggest a timer as a temporary work around.
Something similar on the lines - setTimeout(function(){ alert("Hello"); }, 3000);
I don't think using timeouts is a proper solution or a good workaround, but it's all we have for now. ServiceNow did create a feature request for it, so hopefully it will be added in the future.
edit: some more excellent information from Cory Seering here: Re: Ajax Script Include issue in Fuji