Scope Question: Integration APIs - sn_ws

kprior
Giga Contributor

In a globally scoped application and globally scoped Client Script, the sn_ws object is erroring as not defined?

This is the code, pretty simple. Just retrieves the list of applications identified in the external tool.

try {

var r = new sn_ws.RESTMessageV2('Get Nolio Apps', 'get');

var response = r.execute();

var responseBody = response.getBody();

var httpStatus = response.getStatusCode();

}

catch(ex) {

var message = ex.getMessage();

}

Ideas please!

1 ACCEPTED SOLUTION

kprior
Giga Contributor

I solved by using this in a Script Include as it does not appear to work in a Client Scipt.


View solution in original post

2 REPLIES 2

kprior
Giga Contributor

Ok, some more info... (Really need some help here!)



Since no one has been able to offer any ideas, can someone point me to where the RESTMessageV2 is in the script includes? I keep getting the undefined message when using this script above in a Client Script, but it works perfectly in a runscript in a workflow?



Is it not available in Client Scripts at all or do I need to check the box for client callable if it is not that way out of the box?


kprior
Giga Contributor

I solved by using this in a Script Include as it does not appear to work in a Client Scipt.