User logging through Service Portal should not see few categories in incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 06:33 AM
Hello All,
We have got a requirement that only ITIL users will be able to see all the categories in incident form but it should be invisble for users logging through service portal. Kindly help in acheiving this.
Already wrote client script but it did not work .Any help please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 06:59 AM
you will have to add user criteria for all the catalog items under those 4 categories
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 07:15 AM
Hi @Ankur Bawiskar ,
Thank you for your reply.But its not categories from Catalog Items .Its the category available in the incident form . Can you please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 07:32 AM - edited 01-02-2025 07:34 AM
you can use onLoad catalog client script and check logged in user's role and use g_form.removeOption() for incident form
Also check by checking the URL if it's portal
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 07:36 AM
something like this in onLoad catalog client script, Applies to - ALL
function onLoad() {
var url = top.window.location;
// give portal name here
// if it's portal and role is not itil then remove the options
if (url.indexOf('/sp') > -1 && !g_user.hasRole('itil')) {
g_form.removeOption('category', 'categoryChoiceValue1');
g_form.removeOption('category', 'categoryChoiceValue2');
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 08:53 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader