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

RaghavSh
Kilo 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.


Raghav
MVP 2023

View solution in original post

1 REPLY 1

RaghavSh
Kilo 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.


Raghav
MVP 2023