- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:04 PM
Hi All,
Have a requirement to copy values from TO into Bcc for users whos email end with say "@a.com'
looking for script for a onbefore business rule to active this.
TIZ
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:36 PM
Hello @CV1 ,
You can use the below script to make it work.
var email = current.recipients;
var checkmail = email.slice(email.indexOf('@'));
if(checkmail == '@a.com'){
current.blind_copied = current.recipients;
}
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:36 PM
Hello @CV1 ,
You can use the below script to make it work.
var email = current.recipients;
var checkmail = email.slice(email.indexOf('@'));
if(checkmail == '@a.com'){
current.blind_copied = current.recipients;
}
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 09:26 PM - edited 10-17-2023 10:06 PM
Hi alka,
Thank you for your the solution.
I want to copy both recipients and cc to bcc and then clear "direct" and "copied" values like
// create variables for use from current record
var to = current.direct;
var cc = current.copied;
var bcc += to + ',' + cc;
// update the current record
current.direct = '';
current.copied = '';
current.blind_copied = bcc;
So Bcc need to store TO(direct) cc(Copied) values then clear To and CC values.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 10:48 PM
Hello @CV1 ,
If the solution that I have provided fulfilled your original requirement then please mark it as a Solution.
Thanks,
Alka