Setting Subject in Mail Script for Email Client Template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 10:43 PM - edited 10-21-2022 01:34 AM
Can we set a subject in Mail Script for Email Client Template (sys_email_client_template) . Tried below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 12:56 AM
You can do in a single template and subject line will get selected as per condition match, but be careful with condition what you select should match and keep a default one as well.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 01:03 AM
Do you mean Script in Subject Field ?Can you please share a sample ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 01:12 AM
You can pass array in param2 and manipulate subject on the basis of that
=========================
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var data_=event.parm2.split(',');
for (var i = 0; i < data_.length; i++) {
if (data_[0]=='condition-1') {
email.subject ="subject-1";
} else ....so on
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 01:21 AM
This is from Client email template , you said that it cant be scripted in email script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2022 01:13 AM
I would create different Quick messages and then have the condition on those, so it can only be chosen by the specific groups etc.
Best regards,
Sebastian Laursen