Forum Post: RE: How can we send mails to the respective mailing list in batch class

  • Thread starter Thread starter Godfrey Sorita
  • Start date Start date
Status
Not open for further replies.
G

Godfrey Sorita

Guest
I think I understand your point much clearer now. I will use your examples to present my ideas. 1. If you want to send multiple emails per parent per child(1 recipient per email): You will need to create a middle object to store all unique combination of parent and child. To automate this, you will need to create a trigger(Timing: After Create) from the child object to create a middle object record. With your examples, the trigger should automatically create 8 records: 1 |record 1 |a 2 |record 1 |b 3 |record 1 |c 4 |record 1 |d 5 |record 2 |a 6 |record 2 |b 7 |record 2 |x 8 |record 2 |y Then, you will create a 'Send Email' trigger in your middle object which will be used in your batch job. With your example, Rollbase will send a total of 8 emails. 2. Else, if you want to send a single email per parent record (1 email with multiple recipients): You should transfer the email template from your child object to the parent object. Then, create a 'Send Email' trigger in your parent object. You should use the related children's email addresses (e.g. Children: Email Address, Recipients: Email Adress) on the trigger's TO field. Then, update your batch job to run the newly created trigger on your parent object. With your examples, Rollbase will send a total of 2 emails. Regards, Godfrey

Continue reading...
 
Status
Not open for further replies.
Back
Top