- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 07:53 PM
Hi ,
Trigger email notification when an attachment is added to an incident working fine but unable send with this body
1. Attachment by: Person that attached.
2. Attachment Date: [Date/Time]
3. You can view the attachment by clicking the link below.
4. *[link should take them to the incident.]
Event and email Notification created on incident table
Business rule created on Attachment table
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 04:19 AM
I tried above script and pasted same in body(what it will contain ) also and tried testing and checked preview notification
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 04:29 AM
Hello @Purushotham1992 ,
Kindly check event logs for parm2 value;
Have u updated the business rule code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 05:15 AM
who will receive :
This is body content :
Attachment has been added to Incident
${number} - ${short_description}
1. Attachment by: k[1]
2. Attachment Date: k[0];
And this is Business rule :
Out put :
Attachment has been added to Incident
-
var t = 2024-02-05 13:09:38,lg794609;
var k = t.split(",");
1. Attachment by: k[1]
2. Attachment Date: k[0];
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 05:26 AM
Hello @Purushotham1992 ,
Create a mail script with name "test" using below script:
var t = ${event.parm2};
var k = t.split(",");
var user = new GlideRecord('sys_user');
user.get('user_name',k[1]);
var r= "1. Attachment by: "+user.name;
var cre ="2. Attachment Date: "+k[0];
template.print(r)
template.print(cre)
use this mail script in notification using below line in body of notification
${mail_script:test}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 04:49 PM