- 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 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-13-2025 02:18 AM - edited ‎05-13-2025 02:18 AM
Hi @Chaitanya ILCR , Thanks tried with your approach 1 and it is working fine. So user criteria does not work on native UI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2025 02:29 AM
Hi @sunil maddheshi ,
if you this helped you could you please give a like and accept it as a solution as it would help me and future readers too
Glad it worked
Thanks for letting me know that
it works in native but only works in service catalog where in the way the users are using the template is not through service catalog they are directly going to the template record and (where User criteria doesn't work) those things are given access through ACLs
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 11:38 PM
User criteria ideally should work everywhere.
Try 'User Criteria Diagnostics' from left navigator and see if it is working fine.
Regards,
Sumanth