Add a record to the email notification script "ng_activity_mention_body"

Roar Refsland
Tera Expert

Hi,I need some assistance with the email notification script "ng_activity_mention_body" used in @Mention email when someone is mentioned in an incident work note or comment.

I would like to include the (long) description field from the current incident when someone is mentioned in work note or comment. What would the syntax be, considering that this field is not updated (hence not in the activity stream for the current record).

I was hoping the syntax would be something like, but this does not seem to work;

 if (current.field_name == "description") {
              template.print(recordGR.description.getJournalEntry(1) +   "<br />");

}

Any help is much appreciated!

Regards,
Roar

1 ACCEPTED SOLUTION

Roar Refsland
Tera Expert

Hi,

The "ng_activity_mention_body" script calls fields from the current GlideRecord.
It`s used in the Activity Stream @Mention Email template.

With help from my internal development team I was able to correct the script with the statement to print the Description text in email from the Incident record where @Mention is used.

template.print("<p>" + recordGR.getValue("description") + "</p><br />")

This way the agent receiving the @Mention email does not have to open the incident as he received all info by email along with the acual comment.

Regards,
Roar Refsland

View solution in original post

4 REPLIES 4

Tony Chatfield1
Kilo Patron
Hi, looking quickly the script more/less just creates the link used on notification 'Sctivity Stream @Mention Email' I'm not 100% sure I have understood what you want to achieve with your code, but would expect you can add the task description to the email notification above or below the mail_sript call simple by adding standard field reference to the notification EG ${myField}

Roar Refsland
Tera Expert

Hi,

The "ng_activity_mention_body" script calls fields from the current GlideRecord.
It`s used in the Activity Stream @Mention Email template.

With help from my internal development team I was able to correct the script with the statement to print the Description text in email from the Incident record where @Mention is used.

template.print("<p>" + recordGR.getValue("description") + "</p><br />")

This way the agent receiving the @Mention email does not have to open the incident as he received all info by email along with the acual comment.

Regards,
Roar Refsland

Hello Roar,

I was wondering if there is a way we can record the email sent via Mentions in the activity streams of the records (incident, requests, story, etc).

 

Regards,

Amit

Hi @Roar Refsland ,

I would like to redirect the link to esc portal. can you assist me? Thanks