Hide Self-Service View for Incident

Jeck Manalo
Tera Guru

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 ?

JeckManalo_0-1748917617086.png

 

I am done hiding self-service for incident in application module.

1 ACCEPTED SOLUTION

Chaitanya ILCR
Kilo Patron

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', '')
}

ChaitanyaILCR_0-1748930743367.png

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

 

View solution in original post

12 REPLIES 12

Chaitanya ILCR
Kilo Patron

Hi @Jeck Manalo ,

ChaitanyaILCR_0-1748924954175.png

go to the system UI -> views -> and open the self service view 

delete the forms form sections and lists related to the self service view

ChaitanyaILCR_1-1748925044058.png

also related lists if you have any

 

and clear the cache and logout and log back in and check

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

it was a risk if i delete it, i just want to filter it that for incident self-service view i will just put a admin role so it will be visible only for admin

Hi @Jeck Manalo ,

if you set the role at view level it will impact the other tables as well

if that's okay you can check the approach shared by @SANDEEP DUTTA 

 

else

delete the records I have suggested before deleting the xml backups if needed or you can easily build the form and list layouts back

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Deleting is not a good idea or a best Practice of ServiceNow.

@Jeck Manalo 

Thanks,
Sandeep Dutta

Please mark the answer correct & Helpful, if i could help you.