Fix Script against Scoped Applications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 12:45 AM
Hi,
I have created Global Fix Script to create records in one of my scoped applications. But, I got below error.
"Security restricted: Create operation against 'x_486589_demo_scoped_application' from scope 'rhino.global' has been refused due to the table's cross-scope access policy"
Note: I have used 'update()' method to create records.
Later, I have created fix script in my scoped application then it worked.
Can anyone explain what cross-scope access policy, which is mentioned in above error?
Thanks in Advance!
Thanks,
Hema

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 10:24 PM
Hi Hema,
Since, you want to insert/create records can you make sure the Can Create flag is set to True as well. Also, give link a check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2020 03:33 AM
Hi Jaspal,
I did the same as above and tried after clearing the instance cache as well. But, still no luck.
Script:
var today = new GlideDateTime().getDate();
var gr = new GlideRecord('x_demo_custom_table_1');
gr.query();
while(gr.next())
{
var kd = gr.u_glide_date_1.getDisplayValue();
var id = gr.getValue('sys_id');
if(kd == today)
{
var gr1 = new GlideRecord('x_demo_custom_table_2');
gr1.initialize();
gr1.insert();
}
}
Please do let me know, if you find anything or give a shot from your end if possible.
Thanks,
Hema
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 01:11 AM
Hi Hema,
If you have created fix script in Global Scope and trying to insert/update/delete etc on scoped application table then it would be blocked because of the Application Access Settings at table level.
By default when you create custom table in custom scope then only read operation is allowed outside the current scope
If you open your table and see the Application Access Settings then it would look like this OOB
Accessible from - All application scopes
Can create -
Can update -
Can delete -
Can read - true
Note: Can update - if you enable this checkbox then it should allow you to update from other scope
Can create - if you enable this checkbox then it should allow you to insert from other scope
Mark the comment as a correct answer and helpful if this answers your question.
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
07-12-2020 10:18 PM
Hi Ankur,
Thank you for your clear explanation. I tried as mentioned above but still I see same error.
Thanks,
Hema
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 10:40 PM
Hi Hema,
please share your table config and script
can create and can update checkbox should be true
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader