- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 10:16 PM
Hey everyone, we have standard change template , where we have restricted access based on available for and non-qualified users are not able to access the template on portal but on Native UI still ITIL users able to access this template and created change request from Native UI. Why user criteria not working on native UI.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 11:34 PM
Hi @sunil maddheshi ,
I see the issue
var checkAgainstUC = Class.create();
checkAgainstUC.prototype = {
initialize: function() {},
checkForCatalogItem: function(catalogID) {
var userCriteria = [];
var catm2mgr = new GlideRecord('sc_cat_item_user_criteria_mtom');
catm2mgr.addEncodedQuery('sc_cat_item=' + catalogID);
catm2mgr.query();
while (catm2mgr.next()) {
userCriteria.push(catm2mgr.getValue('user_criteria'));
}
return sn_uc.UserCriteriaLoader.userMatches(gs.getUserID(), userCriteria)
},
type: 'checkAgainstUC'
};
since users are opening std_change_record_producer record directly in table they are able to access it
but the user criteria only evaluates in the catalog view
I would say hide create standard change ui action from the related link by creating above script include
and append the condition condition new checkAgainstUC().checkForCatalogItem(current.sys_id)
This will make sure the button is hidden from the end users
2. you can create a deny unless ACL(I won't recommend this since system has to evaluate every record against the user criteria as the no of records in the table increases you may see performance impact)
create the same script include that I have shared
and create a Deny unless ACL
Better go with the first approach of hiding the UI action
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 10:23 PM
HI @sunil maddheshi ,
check these and see if those will be of any use to you
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783021
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0999197
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 10:33 PM
I can not see anything related to access under this property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 10:25 PM
check this KB
User Criteria not working on the Standard Change Templates
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-12-2025 10:33 PM
I can not see anything related to user access under this property