Issue

  • Glean has detected that one or more of your ServiceNow scripted user criteria are using gs.getUser() or gs.getUserID() functions.
  • These functions cause conflicts when used in diagnostic tools and are not recommended for scripted user criteria.
  • ServiceNow recommends using the pre-defined user_id variable instead for better performance and compatibility.

Resolution

  • Replace any usage of gs.getUser() or gs.getUserID() with the pre-defined user_id variable in your scripted user criteria.
  • The user_id variable contains the user sys_id against whom the evaluation is happening and is available by default in the script context.
  • Update your scripted user criteria scripts to use user_id instead of calling session APIs.

For example, instead of:

var userData = gs.getUserID();

Use:

var userData = user_id;

For more information, see ServiceNow’s user_id variable usage for user criteria documentation.

For additional assistance, please contact Glean Support at https://support.glean.com.