- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 11:04 PM
I have one system property "change_request.autoclose.time" which states that Number of days (integer) after which Reviewed change request are automatically closed. Zero (0) disable this feature. How the Email script will be to use this in my email body content
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 11:24 PM - edited 06-20-2023 11:25 PM
Hello Pritam,
1) Call the email script from the Message HTML in your notification using the below syntax :
E.G : ${mail_script:change_request_details}
2) Now go to left navigation -> Type email script & open 'Notification email script' & either create new script if it's not available or open existing script.
In the email script, you can get & check the system property value using the below syntax
You can refer to OOB email scripts such as 'incident_resolved_incident' or 'incident_body ' & see how its implemented.
Let me know if that helps or if you have any further questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 11:24 PM - edited 06-20-2023 11:25 PM
Hello Pritam,
1) Call the email script from the Message HTML in your notification using the below syntax :
E.G : ${mail_script:change_request_details}
2) Now go to left navigation -> Type email script & open 'Notification email script' & either create new script if it's not available or open existing script.
In the email script, you can get & check the system property value using the below syntax
You can refer to OOB email scripts such as 'incident_resolved_incident' or 'incident_body ' & see how its implemented.
Let me know if that helps or if you have any further questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 11:24 PM
Hi @Pritam_Pawar225 ,
- Add <p>${mail_script:notification_email.styles}</p>.
- Navigate to System Notification > Email > Notifications Email Scripts.
- Click New: "Notification_email.styles"
- On the your email script:
var stylesheet = new GlideRecord ('sp_css');
stylesheet.get('name','company_email_notifications.css'); //Stylesheet for email styling
template.print('<div><style>' + stylesheet.css + '</style></div>');
3. Navigate to System Notification > Email > Notifications.
4. Open the email notification record that should use the template.
5. Navigate to the What it will contain section.
6. From the Email Template field, select the appropriate template.
7. Click Update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 04:28 AM
Thanks guys for your the response Ankur Bawiskar Kiranmai_KVL and Sandeep Dutta
actually I just have to return the value of system property in Email script(refer capture 2jpg) and access it in email Notification's what it will contain MessageHTML(refer capture 3jpg)