The CreatorCon Call for Content is officially open! Get started here.

Business Rule not getting triggered and Script not getting executed from custom application scope.

ankurkumar06412
Tera Contributor

A business rule is not getting triggered from a custom application scope and a custom domain , The table and the entries in the table on whose insert/update the BR is triggered is also in the same domain. There is another table which is in global domain and under application scope global , the BR attached to that table insert/update operation works just fine.

 

Another issue : The scripts which just creates a widget in the pa_widgets table using a script does not work under custom application scope and throws the Error : "Access to api (api name for operation) from scope (Custom scope name) has been refused due to the api's cross scope access policy".
Error : "create operation against "pa-widgets" table from scope (Custom scope name) has been refused due to table's cross scope access policy."

 

I have already tried and created Application cross scope access (Read , Write & Create) from the custom application scope to Global scope with respect to pa_widgets Table.

3 REPLIES 3

Weird
Mega Sage

Does your BR not trigger or just not do what you expect it to do?
Consider logging different parts of the script to make sure whether it's starting.


Also, with different scopes you have to be really careful with what you do. For example does your script need to run from another scope or could it be made in the same one?
For cross-scope records you have to make sure your target and source scopes, target name and target type are correct. Are you giving an access to table or script include for example? Have you marked it as allowed?

Also in script if you're calling a script include or even a rest message from another scope, you need to add the source scope. For example "global.<script include name>" where global is the scope of the script include. Script includes also have "accessible from all scopes" option available. 

If you're working on table level, then you might want to check your table definition whether there's any restrictions on accessing it from other scopes.

I have tried the steps mentioned above as a resolution , but no luck!!

Ankur Bawiskar
Tera Patron
Tera Patron

@ankurkumar06412 

share the script and the cross scope records you created

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader