Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

ScopeAccessNotGrantedException

Shaik22
Tera Expert

Hi,

 

I have to populate the integration type field but the system throws the error when i run fix script.

var integrationName = 'Tenable'; //integration name

var integrationGR = new GlideRecord('sn_sec_int_integration');// Querying the sn_sec_int_integration table for the specified integration name
integrationGR.addQuery('name', 'integrationName');
integrationGR.query();
if (integrationGR.next()) {
integrationGR.integration_type = 'SCANNER';
integrationGR.update();
}

 

ERROR:

Root cause of JavaScriptException: com.glide.script.fencing.access.ScopeAccessNotGrantedException 
: com.glide.script.fencing.access.ScopeAccessNotGrantedException: read access to sn_sec_int_integration not granted: com.glide.script.fencing.ScopedGlideRecord.checkOperationPermitted(ScopedGlideRecord.java:253)
com.glide.script.fencing.ScopedGlideRecord.jsFunction_query(ScopedGlideRecord.java:190)

 Can you  please suggest the solution.

1 REPLY 1

Mark Manders
Tera Patron

Your error says it all: you are in the wrong scope. Can you try running your fix script in the same scope as the table your are updating? Or look in your Application Cross-Scope Access table to see if you have anything created for this access you can just set to 'allow' (depending on the version you are on).