- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 07:30 PM
Hello Everyone,
Is there a way to hide the self-service view for Incident ?
I saw this Hide Incident self service view - ServiceNow Community - this work but unfortunately it will also hide all self-service other form section like request item demand etc.
Is there a way that I can hide self-service for Incident only ?
I am done hiding self-service for incident in application module.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 11:10 PM - edited 06-02-2025 11:13 PM
Hi @Jeck Manalo ,
try this onload client script
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getViewName() == 'ess')
switchView('', 'incident', '')
}
extend this script if required
example if you want to exclude admin users use g_user.hasRole() etc
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getViewName() == 'ess' && !g_user.hasRole('admin'))
switchView('', 'incident', '')
}
I have tried the view rule to route from ess view to default only when form is opened in ess view but it's not working as expected
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 10:26 PM
Actually about workaround i think that already as an option to redirect them into default view when they are selecting self service view.
Using BR but I don't know if I written it correctly.
Table: UI View
When to run: before insert/update
code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 11:10 PM - edited 06-02-2025 11:13 PM
Hi @Jeck Manalo ,
try this onload client script
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getViewName() == 'ess')
switchView('', 'incident', '')
}
extend this script if required
example if you want to exclude admin users use g_user.hasRole() etc
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getViewName() == 'ess' && !g_user.hasRole('admin'))
switchView('', 'incident', '')
}
I have tried the view rule to route from ess view to default only when form is opened in ess view but it's not working as expected
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 11:19 PM
Thank you this is working.