Errors due to the api's cross-scope access policy

Riro1
Kilo Contributor

Hello! I tried running this code and got these errors. I tried to find a problem here but couldn't fix it so I guess I have no choice but to asks for the experts here:

THE CODE:

var gr = new GlideRecord('sys_transform_entry');
gr.initialize();
gr.source_table = "x_621597_service_o_service_one_import";
gr.target_table = "x_621597_service_o_service_one";

gr.source_field = "bill_add";
gr.target_field = "billing_address";
gr.map = "d53664c787a3011032bfcaaf8bbb3567";
gr.insert();

THE ERROR:

Security restricted: Access to api 'put(sys_transform_entry.source_table)' from scope 'x_621597_service_o' has been refused due to the api's cross-scope access policy
Security restricted: Access to api 'put(sys_transform_entry.target_table)' from scope 'x_621597_service_o' has been refused due to the api's cross-scope access policy
Security restricted: Access to api 'put(sys_transform_entry.source_field)' from scope 'x_621597_service_o' has been refused due to the api's cross-scope access policy
Security restricted: Access to api 'put(sys_transform_entry.target_field)' from scope 'x_621597_service_o' has been refused due to the api's cross-scope access policy
Security restricted: Access to api 'put(sys_transform_entry.map)' from scope 'x_621597_service_o' has been refused due to the api's cross-scope access policy
Security restricted: Create operation against 'sys_transform_entry' from scope 'x_621597_service_o' has been refused due to the table's cross-scope access policy

THE SITUATION:

I run it in global and there was no problem but I need to put this code in the scoped application and obviously, it got an issue with the cross-scope access policy. 

Anyone can help me with this?

28 REPLIES 28

Hi,

I don't think that is related to this

Regards
Ankur

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

Then I guess there are OOB tables that wont allow you to insert new records from a scoped application by turning the CREATE to true...

Hi,

I was able to insert record into that table from other scope by creating Restricted Caller Access Privelege

Ensure you are in your correct scope and visit the restricted caller module

create record like this

find_real_file.png

find_real_file.png

Regards
Ankur

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

Here are the screenshot that I did. Can you please check if there is something I missed?

This is the Transform Map

find_real_file.png

This is the code that I will run

find_real_file.png

This is the cross scope privileges

find_real_file.png

 

And this is the table

find_real_file.png

 

I wonder if there is something I did not follow correctly...