
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2022 02:07 AM
Hi,
I'm encountering this issue "Mandatory false not set on field vendor: cross-scope access denied"
I have created a scope app table that extends to application table where i'm making use of the vendor field.
But when i try to make the field mandatory false the error message shows in the logs "Mandatory false not set on field vendor: cross-scope access denied".
What kind of cross scope access do we need for this one?
Thanks,
Tads
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 09:30 PM
Hi Everyone,
It seems this is an existing problem in ServiceNow
Please see related Now Support Article:
Client scripts on a scoped table in cmdb hierarchy with g_form methods like "setMandatory, setDispla...
Description
Error "cross-scope access denied" thrown from scoped client scripts using g_form methods on global TPP fields.
Steps to Reproduce
1. Create a new or open an existing scoped application in Studio
2. Create a new scoped table extending cmdb_ci
3. Add an on-load client script as below on the scoped table to set a global field like "install_status" as Mandatory or read only, etc.
function onLoad() {
g_form.setMandatory('install_status', false);
g_form.setDisplay('install_status',true);
g_form.setReadOnly('install_status', false);
g_form.setDisabled('install_status', false);
}
4. Navigate to the list view of the table from step 2 and click New.
Result: The script does not work and below messages are seen in the console when the form loads
Mandatory false not set on field install_status: cross-scope access denied.
Display true not set on field install_status: cross-scope access denied.
ReadOnly false not set on field install_status: cross-scope access denied.
Disabled false not set on field install_status: cross-scope access denied.
Workaround
Use UI Policy and add a UI Policy Action to perform similar actions on the field.
Related Problem: PRB1384434
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2022 02:11 AM
Hi,
trying to make mandatory using UI policy?
Are you sure the filed is in same scope?
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
‎08-31-2022 01:24 AM
Would you like to share any update on this?
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
‎08-19-2022 02:11 AM
Hello,
Is extended table in same scope as your custom table ? if not then you have to define cross scope privilages so that once you validate this through code you won't see such errors.
https://docs.servicenow.com/en-US/bundle/sandiego-application-development/page/build/applications/reference/c_CrossScopePrivilegeRecord.html
https://docs.servicenow.com/en-US/bundle/sandiego-application-development/page/build/applications/concept/restricted-caller-access-privilege.html
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2022 02:15 AM
How are you setting the mandatory field, is it UI policy or client script?
Is it within same scope or different scope?
If from a different scope, that's why error would be coming, try to create config within the same scope as the table, if not possible, then enable cross scope development on the table.
Configure table > Application access > Allow configuration as True
Aman Kumar