Catalog item maximum 1 order per user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
I have a catalog item that has as requirement maximum 1 order per person.
What would be the best practice on how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @NMMZ10,
there might be several ideas how to get this.. but please share more details about the scenario - does it matter what is the state?
Thing to consider.. example: somebody submits it and it will be rejected, can they still submit a new one or not anymore?
Please first think of the design and based on knowing the details we can discuss what would be the best solution to it...
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
best way is to use User Criteria and use script and don't show that catalog item itself on portal
Then add that in "Available For" related list of your catalog item.
Something like this in script
var gr = new GlideRecord("sc_req_item");
gr.addQuery("item.name", "Your Item Name Here");
gr.addQuery("request.requested_for", user_id);
gr.setLimit(1);
gr.query();
answer = gr.hasNext();
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
