How to remove double header on portal?

PareshSJoshi
Tera Expert

Hello there,

Our requirement was to redirect every user to Employee Center Portal, that we fulfilled successfully.

On portal we created one menu "ITIL View" which will be visible on to user with ITIL Role and which redirect user to homepage of platform (ie. instance-name.service-now.com/now/nav/ui/home).

Now issue is, if we impersonate user with ITIL or Admin role, it redirects to instance-name.service-now.com/now/nav/ui/classic/params/target/esc link. Due to which we are seeing double header as shown in image.

We want to remove the 1st header.

ESC Portal ScreenshotESC Portal Screenshot

Things we used to redirect users are:

1. Script include: SPEntryPage- changes- line 22/23 - this.portal = "esc";

2.System properties: Created - glide.entry.page.script & glide.entry.first.page.script with value given in SPEntryPage

SPEntryPage script includeSPEntryPage script include

3.System properties: Updated - glide.login.home - changes - value: esc

System property - glide.login.homeSystem property - glide.login.home

4. Client script: Name: ESC Redirect - onLoad - Script: 

function onLoad() {
g_glide.redirect('/esc');
}

ESC Redirect - Client ScriptESC Redirect - Client Script

5. UI Page: name: oauth_login : changes: line 2-  <script src="esc_redirect.jsx"> </script>

UI Page oauth_loginUI Page oauth_login

 

1 ACCEPTED SOLUTION

Hello @Community Alums ,

Thank you for your reply.

We already have created that system property and its value. I also have mentioned the same in my query itself.

And the problem is solved now, there is no appearance of double header.

We commented couple of line in SPEntryPage Script Include. I'm attaching image of those lines.

 

Commented lines of SPEntryPage script inlcudeCommented lines of SPEntryPage script inlcude

 

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @PareshSJoshi,

 

The top header you are seeing is because the portal is opened in native UI.

If the portal is directed to instancename/esc - you will not find the top header.

 

Create or update the system property glide.entry.first.page.script. In some instances, this may already exist, but in many, it will need to be created as a String type property. Make sure to set the value to new SPEntryPage().getFirstPageURL() in order to invoke the SPEntryPage script.

 

For more details : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746730

 

Please give a like. and mark it as solution.

 

Thanks

Akash

Hello @Community Alums ,

Thank you for your reply.

We already have created that system property and its value. I also have mentioned the same in my query itself.

And the problem is solved now, there is no appearance of double header.

We commented couple of line in SPEntryPage Script Include. I'm attaching image of those lines.

 

Commented lines of SPEntryPage script inlcudeCommented lines of SPEntryPage script inlcude

 

Hi @Community Alums &  @PareshSJoshi
After commenting the above code still double header appears. So is there any other solution for this.