How can I fetch catalog item's sys_id or name in User Criteria script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2020 03:48 AM
Hey Folks!
I want to apply a scripted User Criteria to some of the catalog items. To determine the visibility, I need the name of the catalog item(or sys_id) of the catalog item.
I have already tried using RP.getParameterValue("sysparm_id") mentioned in this link https://community.servicenow.com/community?id=community_question&sys_id=1546cba1db1cdbc01dcaf3231f9619fe. However, it gives an error saying RP is not defined. Could you please suggest an alternative to this?
Thanks,
Akshat
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2020 08:01 AM
Hi Ankur,
I already have this workaround in place. However, there are many catalog items visible to users which they cannot access. Users open them and are made to realize that they cannot order them.
It keeps the rule for accessibility intact but reduces the user experience to a great extent.
Many thanks for your time though 🙂
Best Regards,
Akshat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2020 09:46 AM
Hi Akshat,
please remember to tag the comment as correct answer and also as helpful.
This helps others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2020 10:14 PM
Hi Akshat,
please remember to tag reply as correct answer and also as helpful.
This helps others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 11:50 AM