Using User Criteria in a Condition, such as a Portal Header Menu
Import
·
Feb 12, 2020
·
article
After a lot of debugging and numerous searches on the Community, I wanted to post what seems to be the only working solution I've been able to come up with for using User Criteria to limit something via a Condition, such as a Header Menu via the Service Portal.
SNC.UserCriteriaLoader.getAllUserCriteria().toString().includes("sys_id_of_the_User_Criteria_record")
Note that you don't need the User Criteria for the Service Portal plugin for this to work.
View original source
https://www.servicenow.com/community/developer-articles/using-user-criteria-in-a-condition-such-as-a-portal-header-menu/ta-p/2305388