Portal Redirection

MUJAVAR SUBHANI
Tera Contributor

'snc_internal' role contains another role like 'x_sap'. Without 'x_sap' role if any 'snc_internal' users login to servicenow instance they are redirecting to portal page. But with 'x_sap' contain role they are redirecting to native dashboard view instead of portal page. 'snc_internal' role with contain role also need to redirect portal page. Anyone please provide valid approach for this to achieve the functionality.

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@MUJAVAR SUBHANI 

you can use OOTB script include and update it SPEntryPage()

check this link

Role based redirection with SPEntryPage 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Already tried by modifying OOTB SPEntryPage script include but not working. Will check exactly same like this.

@MUJAVAR SUBHANI 

it should work fine.

Many customers have used the same OOTB script include.

Since your role "snc_internal" contains another scoped app role and hence hasRole() might not work properly.

you should query sys_user_has_role to check if that user has only that scoped app role and not snc_internal

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

SPEntryPage is the best way to achieve this? what changes you did?

Also check your system has the property calling SPEntryPage script.

 

Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn