- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 01:12 AM
ESS users redirect to sp page based on the following property ( glide.entry.loggedin.page_ess) ,
In exception case if ESS users belong to plant department then should redirect to nav.do page
can we set value of property based on script ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:23 AM
Yes you can, you can modify the Script Include that is provided OOTB named SPEntryPage
That Script Include that is controlled by a pair of System Properties to automatically route users to the service portal (/sp). To set this up you need to add a property to the sys_properties (table) and by default all users that do not have a role will be automatically pushed to the service portal.
To create the new property follow these steps:
- type “sys_properties.list” in the filter navigator and press enter
- check to see if the “glide.entry.first.page.script” property already exists (if it doesn’t click NEW at the top of the list view)
- Name: “glide.entry.first.page.script“
- Value: “new SPEntryPage().getFirstPageURL()“
- Click SAVE
This Support page article takes you through the basics:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746730
You will also find these useful:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0747432
Here is an example of changing it to redirect users without a certain role:
You want to redirect all users who do not have a specific role to the service portal. This can be accomplished by implementing the above mentioned System Property and altering a baseline Script Include called “SPEntryPage“.
To automatically redirect users to the service portal if they do not have a particular role:
- Go to System Definition/Script Include module and search for the script include called “SPEntryPage“.
- Alter line #69 (it looks like this) by altering the script to include a role such as “itil” it will redirect all users that do not have the “itil” role (or the admin role because admin is included by default) directly to the service portal. Your altered script should look like this:
If helpful please mark as Helpful/Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:23 AM
Yes you can, you can modify the Script Include that is provided OOTB named SPEntryPage
That Script Include that is controlled by a pair of System Properties to automatically route users to the service portal (/sp). To set this up you need to add a property to the sys_properties (table) and by default all users that do not have a role will be automatically pushed to the service portal.
To create the new property follow these steps:
- type “sys_properties.list” in the filter navigator and press enter
- check to see if the “glide.entry.first.page.script” property already exists (if it doesn’t click NEW at the top of the list view)
- Name: “glide.entry.first.page.script“
- Value: “new SPEntryPage().getFirstPageURL()“
- Click SAVE
This Support page article takes you through the basics:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746730
You will also find these useful:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0747432
Here is an example of changing it to redirect users without a certain role:
You want to redirect all users who do not have a specific role to the service portal. This can be accomplished by implementing the above mentioned System Property and altering a baseline Script Include called “SPEntryPage“.
To automatically redirect users to the service portal if they do not have a particular role:
- Go to System Definition/Script Include module and search for the script include called “SPEntryPage“.
- Alter line #69 (it looks like this) by altering the script to include a role such as “itil” it will redirect all users that do not have the “itil” role (or the admin role because admin is included by default) directly to the service portal. Your altered script should look like this:
If helpful please mark as Helpful/Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 10:29 AM
@Ankur Bawiskar Any Help would be helpfull
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 07:03 PM
Paul has already mentioned the approach.
you need to update the script include
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader