SNC.Notify not defined in scope app

wakespirit
Kilo Guru

Dear all,

I am using the following script to initiate a notify call

var notify = new SNC.Notify();
var from = '+41215391714';
var to = '+41786930906';
// set up a conference call
var conferenceCall = new GlideRecord('notify_conference_call');
conferenceCall.active=true;

notify.call(from, to, conferenceCall);

This is working ok if i am in Global scope.

Then if i use this in my scope app, i get error on undefined object SNC.Notify

Any idea how to make it work on scoped app ?

regards

 

1 ACCEPTED SOLUTION

I am one of the developers of this product, who is leading this currently. Sorry that this info was missing from docs. We are getting this fixed.

View solution in original post

6 REPLIES 6

Michael Fry1
Kilo Patron

Try changing to: new global.SNC.Notify()

hi michael,

same thing happen, SNC.Notify to define in script when used in scopped app.

java.lang.SecurityException: Invalid object in scoped script: [object SNC]
Caused by error in sys_script.599cf5d62f76a30061999bacf699b620.script at line 3

1: (function executeRule(current, previous /*null when async*/) { 
2: 
==> 3: var notify = new global.SNC.Notify(); 
4: //get conference information from table 
5: var conferenceCall = new GlideRecord('notify_conference_call'); 
6: conferenceCall.addActiveQuery(); 

Any other idea ?

Nirupam Biswas
ServiceNow Employee
ServiceNow Employee

In scoped world the API name is changed. In scoped would you need to instantiate sn_notify.NotifyScoped. This information was unfortunately missing from documentation and will be available soon.

Great it works, how did you find that ?