
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:11 AM
function testMe()
{
var r = new sn_ws.RESTMessageV2('test', 'get');
console.debug("r: " + r);
var response = r.execute();
console.debug("response: " + response);
var responseBody = response.getBody();
console.debug("responseBody: " + responseBody);
var httpStatus = response.getStatusCode();
console.debug("httpStatus: " + httpStatus);
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:22 AM
Perfect.
Can you please mark the thread answered if this resolves your issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:26 AM
Glad you got it figured out. FYI - best practice is to avoid using getXMLWait() and use getXML() when ever possible. getXMLWait() is synchronous and can hold the browser hostage while it waits for a response from the server. In most cases the user won't notice, but that's MOST cases, not all.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:29 AM
Ahhh... dam, I never knew that! Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:29 AM
Great suggestion Chuck.
@David, Here are more tips on client side best practices.
Client Script Best Practices - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2016 06:35 AM
Great link. http://wiki.servicenow.com/index.php?title=Client_Script_Best_Practices#Example:_Asynchronous_GlideA... shows exactly what Chuck was referring to. Thanks.