Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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.