How to create dynamic hyperlink in notification so it can redirect to either portal or workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-18-2024 03:11 PM
How to create dynamic hyperlink in email notification so that it can redirect to either portal or workspace based on the user group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-18-2024 10:24 PM
Hello @Veda3 ,
You have to write a Email Script and later call that in Email notification for dynamic link using
${mail_script:nameofthescript}.
In Email Script Glide 'sys_user_grmember' table to check the group of the user and according to that you can create if else condition and write the code accordingly.
For dynamic link you this
taskUrl = '<a href="/asc?id=hrm_todos_page">Link</a>'; // use link of workspace or portal instead of asc?id=hrm_todos_page
// Create the email body with the task URL included
var emailBody = taskUrl ;
// Set the email body
template.print(emailBody);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2024 12:42 AM
Hi @Priyanka0402,
How to go through all the recipients of the notification and send the notification accordingly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-29-2024 12:49 AM
If you want to send to all the members of the user group, there are two ways to do it.
1. Create the notification and give the reference of the group name so that email will be send to all the members of the group
2. dynamically you can give the reference of the group name in the table 'sys_user_grmember' and modify your code the send the email with the link of the record,
to send the link
Link to related records (servicenow.com)
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-08-2024 11:28 AM
How to send the notification if notification has multiple recipients like watchlist,caller and assignment group. I am able to send the dynamic notification if there is one user like caller or assignee. but how to send the notification if we have multiple recipients and also watchlist