Jayakrishna Aku
ServiceNow Employee
ServiceNow Employee

This article provides the steps for configuring email notification when a user is tagged or mentioned (@) in the Roadmap comments section. Through these steps, you would be able to configure the appropriate landing page on the APW Roadmap when user clicks the link in the email notification. 

Below are the steps:

  • Navigate to Email -> Notification Email Scripts, create new email script
  • Name: ng_activity_mention_body_for_APW

Add the below script:

      var result = new ActivityMentionEmailValues().getEmailValues(current.table, current.document);

      if (result) {

            result = JSON.parse(result);

            email.setSubject(gs.getMessage("You have been mentioned in {0}", result.subjectText));

            template.print("<p style='color: #424E5B;margin: 0 0 12px;line-height: 26px;margin-bottom: 12px'>");

            template.print(gs.getMessage("You have been mentioned by {0} in", current.user_from.name));

            template.print("&nbsp;<a href='/now/alignment-workspace/roadmap/" + result.recordSysId + "/111'>" +           result.linkText + "</a></p>"); 

}

find_real_file.png

  • Navigate to Email -> Notifications
  • Find record name is ‘Activity Stream @Mention Email’, edit when to send condition by adding below code to line 2.

         if (current.table + '' === "sn_roadmap_plng_roadmap_definition") 

         return false;

Note: If you want to get email link to roadmap record form as well, then you don’t need to change the above condition.

find_real_file.png

 

  • Insert another record from above ‘Activity Stream @Mention Email’ record and give it a new name. There will be 2 changes here:
    1. Change line 2 condition to: current.table + '' !== "sn_roadmap_plng_roadmap_definition"
    2. In what it will contain tab, change script name to ‘ng_activity_mention_body_for_APW’

find_real_file.png

 

find_real_file.png

Note: These steps are primarily for the APW Roadmap feature released in Quebec version (v1), and the APW Ad Hoc Roadmaps released as part of Rome (v2). We are planning to address this in future release.

Version history
Last update:
‎08-24-2021 07:26 AM
Updated by: