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 09:57 PM
Use Client Scripts for the Platform UI
function onLoad() {
if (gs.hasRole('itil')) {
g_form.setVisible('category', true);
} else {
g_form.setVisible('category', false);
}
}
Hide Categories in the Service Portal Using Widget Configuration
function hideCategoryField() {
if (window.location.pathname.includes('sp')) {
document.querySelector('[data-field-name="category"]').style.display = 'none';
}
}
hideCategoryField();
Log in as an ITIL user on the platform and ensure categories are visible.
Log in as a Service Portal user and confirm the categories are hidden.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 03:06 AM
Hi @vishwajeet5550 ,
This are the incident category that is created by Record Producer how should i code that.