I am a little stuck with flowcharts, everything is working perfect until I need to send an email to multiple accounts entities that are related to main entity, the problem is if I use the Send Email Task, I can only email using the To but this is including everyone's email rather than sending the email to each account without sharing others emails, I assume the best way to do this is using BBC but this is not visible on the Email Task form (don't understand why not).
The only other option I guess is to use formula but this doesn't seem to like it when I use "record\findRelatedMany".
this is what I am trying at the moment
$ids = record\findRelatedMany('Notification', $noteid, 'accounts', 1000, 'createdAt', 'desc');
$emailId = record\create(
'Email',
'from', $sender,
'to', 'test@test.com',
'cc', 'test@test.com',
'bcc', 'teams@stylisticdesign.com',
'subject', $alert,
'isHtml', true,
'status', 'Sending',
'parentId', $noteid,
'parentType', 'Account'
);
ext\email\applyTemplate($emailId, '62a413ec9c4831379');
ext\email\send($emailId);
Is this the correct way or should I be using something that converts the ID's to emails and if so what should I use?
Other option is make the BCC drop down show on the Email Task in flowcharts but no idea where that is
The only other option I guess is to use formula but this doesn't seem to like it when I use "record\findRelatedMany".
this is what I am trying at the moment
$ids = record\findRelatedMany('Notification', $noteid, 'accounts', 1000, 'createdAt', 'desc');
$emailId = record\create(
'Email',
'from', $sender,
'to', 'test@test.com',
'cc', 'test@test.com',
'bcc', 'teams@stylisticdesign.com',
'subject', $alert,
'isHtml', true,
'status', 'Sending',
'parentId', $noteid,
'parentType', 'Account'
);
ext\email\applyTemplate($emailId, '62a413ec9c4831379');
ext\email\send($emailId);
Is this the correct way or should I be using something that converts the ID's to emails and if so what should I use?
Other option is make the BCC drop down show on the Email Task in flowcharts but no idea where that is
Comment