We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

catalog item visible to user only for the first time

Likith
Tera Contributor

How can we make the catalog item visible to user only for the first time?

1 ACCEPTED SOLUTION

Raghav Sharma24
Giga Patron

1. Create a user criteria "Available for" for your catalog item with below script:

answer=false;
var user   = new GlideRecord('sys_user');
user.addEncodedQuery('last_login_timeISEMPTY^sys_id='+gs.getUserID())
user.query();
if(user.next())
{
answer=true;
}


Please mark the answer correct/helpful accordingly.

View solution in original post

1 REPLY 1

Raghav Sharma24
Giga Patron

1. Create a user criteria "Available for" for your catalog item with below script:

answer=false;
var user   = new GlideRecord('sys_user');
user.addEncodedQuery('last_login_timeISEMPTY^sys_id='+gs.getUserID())
user.query();
if(user.next())
{
answer=true;
}


Please mark the answer correct/helpful accordingly.