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

SANDEEP DUTTA
Tera Patron
Tera Patron

Hi @Jeck Manalo ,

1)Navigate to  System UI -> views

2)Search for view name in the title column as show in below image

SANDEEPDUTTA_0-1748925692712.png

 

3)Open the record and you can hide the view for specific groups or roles or user by using fields which are shown in the image below

SANDEEPDUTTA_1-1748925692749.png

 

 

In your Case, for Self-Service, restrict using a Role :

SANDEEPDUTTA_2-1748925731500.png

 

 

Thanks,
Sandeep Dutta

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

Could you re-paste the 2nd picture i want to see the field on it.

Its smaller so i can't able to view in directly.

Ankur Bawiskar
Tera Patron
Tera Patron

@Jeck Manalo 

the self service view is used at multiple places OOTB, why to delete that?

If you still want to do then check approach shared by @Chaitanya ILCR 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

yes correct, instead of deleting, i would like to filter that only admin can view the self-service portal for incident.

@Jeck Manalo 

if you delete then it's gone and if customer again wants you will have to re-create it again and the related components.

You can hide the entire view based on roles, hidden checkbox etc but that view will be gone from all the tables include incident, problem etc

AnkurBawiskar_0-1748927757823.png

 

Another workaround is to let them see and if they select that view then take them again to default view

OR

Create a view rule and take them always to Default view

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader