- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 10:06 PM
Hello,
I need to add two email ids as cc whenever notifications are sent. I created a system property to store the email ids and used it in an email script. But when the notification was sent, in the cc it was displayed emailidINCnSR which is the value of my system property. When i tried by putting only one emailid in the value of property, it is showing in cc. But when when i put both the emailids in the value of the property, it doesnot show anybody in cc. Is it a mistake in the system property or the email script? Please help.
Screenshot of system property is as shown:
Email script is as follows:
var tableName = current.getTableName();
if(tableName== 'change_request')
{
var emlid = gs.getProperty('cc.emailid.CHG');
var emaillist =[];
if(emlid)
{
emaillist = emlid.split(',');
email.addAddress('cc',emaillist,'');
}
}
else
if((tableName=='incident')||(tableName=='sc_req_item'))
{
var emailid = gs.getProperty('cc.emailid.INC.SR');
var cclist = [];
if(emailid)
{
cclist = emailid.split(',');
email.addAddress('cc',cclist,'');
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 10:49 PM
Well when you split a string it return an array and you have to traverse on that array to access the values. Below modification required
emaillist = emlid.split(',');
for(var i=0; i<emaillist.length; i++){
email.addAddress('cc',emaillist[i],'');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2018 11:09 PM
Hi reeba,
On your first query-->
I think in your case string type should be fine. Whatever is the type the value will be retrieved as "String". we go for choice list in case you want to set values to choice type fields on the form and want to perform any other logic based on choices.
Second Query-->
In"sent" module you can personalize the list layout and can pull fields"Copied" and "Blind Copied" to check "CC" and "BCC" Recipients.
Hope this clarifies your query.