Errors due to the api's cross-scope access policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 12:28 AM
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?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 12:49 AM
HI
This thread will help you understand :https://community.servicenow.com/community?id=community_question&sys_id=c4988746db2388141cd8a345ca96...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 12:57 AM
Hi,
you need to create cross scope privilege record for this
OOB table sys_transform_entry has Can create checkbox unchecked so it means script from other scopes cannot insert record into this table; check that checkbox and then run your script again
It would then allow the insert from other scope
If you want update also to happen then check Can update checkbox
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 01:05 AM
Hello Sir,
I followed your solution but the error is still there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 01:53 AM