Why is access to api 'setAbortAction' refused from scoped application

amitmparikh
Tera Contributor

Following error is received when accessing current.setAbortAction from a before business rule on sc_task table from within an scoped application,

"Access to api 'setAbortAction' from scope 'x_13487_xxxx' has been refused due to the api's cross-scope access policy"

Is there an alternate way to set abort action from within an application scope?

Amit

1 ACCEPTED SOLUTION

Hi Sergiu,



The system always enforces the following creation restrictions when a developer adds a configuration record belonging to another application scope. Please refer the below link for more info.


Creation Restrictions Across Application Scopes - ServiceNow Wiki


However the link you pointed is correct as we can use abort action on the custom tables created as part of the scoped application(their own scope).



Please let me know if you have any questions.


View solution in original post

9 REPLIES 9

Hi Pradeep,




Unfortunately, Kalaiarasan P is right on this one. See here wiki page where it is mentioned it is possible:



Scoped GlideRecord API Reference - ServiceNow Wiki



Check chapter 10, subchapter 10.1.


If this is not the case, then wiki should be updated.



Regards,


Sergiu


Hi Sergiu,



The system always enforces the following creation restrictions when a developer adds a configuration record belonging to another application scope. Please refer the below link for more info.


Creation Restrictions Across Application Scopes - ServiceNow Wiki


However the link you pointed is correct as we can use abort action on the custom tables created as part of the scoped application(their own scope).



Please let me know if you have any questions.


Much clear now Pradeep.



Thanks


Sergiu


Thanks Pradeep!



Now it is much clear why this behavior, and it makes sense.



How would you be your recommendation for the problem I am trying to resolve?



Problem: I have created a catalog item in an app scope, and would like to implement a rule that only the assignee can close the catalog task?



Thanks,


Amit


I am running into the same issue and was wondering if anyone came up with a solution to this problem of not being able to use setAbortAction on the sc_task table from a scoped application.