Cross Scope Issues

samadam
Kilo Sage

I have a custom app that has a table on change of status on this I need to update the sys_user_group table. I have business rules to do it but I keep getting cross scope errors. I added a cross-scope privilege and tried to clear cache but still not working. There are no caller access restrictions. Also tried to add the application to update set but did not help. Any ideas how to fix? Group table has the Allowed access for write and create.

2 REPLIES 2

GlideFather
Tera Patron

Hi @samadam,

 

"I keep getting cross scope errors" - what errors are you talking about? this is too abstract to help you, could you possibly share that error?

 

Also, sharing your business rule would definitely help to review it

_____
100 % GlideFather experience and 0 % generative AI

samadam
Kilo Sage

Error Message

Write operation against 'sys_user_group' from scope 'x_g_test_mgt' has been refused due to the table's cross-scope access policy
 
After BR on the custom table:
var grp_rec = new GlideRecord('sys_user_group');
    grp_rec.addQuery('sys_id', current.assignment_group);
    grp_rec.query();
    if (grp_rec.next()){
        grp_rec.u_update_required = false;
        grp_rec.update();
    }