Record deletion from Background Script was refused due to the table's cross-scope access policy...

Aki17
Kilo Guru

I ran the following Background Script to delete all the Case records which are unnecessary.

var gr = new GlideRecord('sn_customerservice_case');
gr.query();


gr.deleteMultiple();

I tried in both Global and Customer Servise scope, but the error occurred for each and the script did not ran...

find_real_file.png

Please give me some advice to make it work properly.

Best Regards,
Aki

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

Deleting records from that table is not allowed from different scopes. If you want to allow deletion then check below checkbox on table configuration record <sys_db_object>. 

find_real_file.png

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

Deleting records from that table is not allowed from different scopes. If you want to allow deletion then check below checkbox on table configuration record <sys_db_object>. 

find_real_file.png

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande