The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Roles usually used to redirect email notification to Native View

AmulyaP
Tera Contributor

Hi,

Can anyone please help me what are the roles usually used to redirect email notification to Native View?

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@AmulyaP 

what's your actual business requirement?

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

AmulyaP
Tera Contributor

there is a custom portal widget where it shows all my group's assigned catalog task shown there for application owner who are not familiar to servicenow would go and after account provisioning would go and complete or cancel from portal. iam trying to modify existing notification sent to assignment group( for different task tables). i want to write email script which won't conflict redirection for other tables.

Hi @AmulyaP ,

please find the below same script , and let know if its working 

 

// Get the current task record
var task = current;

// Define base URLs
var portalBaseURL = gs.getProperty('glide.servlet.uri') + 'your_custom_portal_path';
var defaultTaskURL = gs.getProperty('glide.servlet.uri') + task.getLink(true);

// Check if the task is a catalog task
if (task.getTableName() == 'sc_task') {
    // Redirect to custom portal widget for catalog tasks
    template.print('<a href="' + portalBaseURL + '?task_id=' + task.sys_id + '">View Task in Portal</a>');
} else {
    // Default redirection for other task types
    template.print('<a href="' + defaultTaskURL + '">View Task</a>');
}

 

 

please make this correct if this is helpful and close the thread by accepting the solution .

 

Thanks,

Rithika.ch

@AmulyaP 

so what did you start with and where are you stuck?

Redirection in ServiceNow is governed based on SPEntryPage script include

It might conflict with the link you are giving.

Example: if you are taking user to native UI but that script include is taking user to Workspace then it will contradict.

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

Sujit Jadhav
Tera Guru

Hello @AmulyaP ,

Out-of-the-box (OOTB) email notifications typically point to the Native View (UI16).
If you're using a Service Portal redirection, it usually involves a script like SPEntryPage, which checks user roles and redirects accordingly.
For ITSM, unless you’ve customized the notification URLs or redirection logic, users will land in the Native View.
So, if your goal is to ensure redirection to Native View, you typically don’t need to assign any special roles then just avoid assigning roles that trigger portal redirection logic.


"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

Thank You,

Sujit Jadhav