How can i attach list of files in the email

Posted by Sudhakar on 04-Sep-2014 17:59

Hi all,

i am creating email template,in the email template i need to attach all its related attachments.how can i achieve this.

As shown in the above figure we have relation b/w client and Attachment.
my requirement is in the emails we need to attach all its related attachment.

All Replies

Posted by Chandrasekhar Gontla on 04-Sep-2014 22:07

Hi Sudhakar,

In email template, it will talk about only one record.

If you want to loop through multiple records/related records, then use Reports.

-> Create a report of type HTML Template

Example:

Say, We have 2 objects called Groups and Locations. The below snippet is to fetch the list of locations thar are related to Group

<body>

{!#LOOP_BEGIN.all#2354836}

{!$ORG_LOCN.city}<br>

{!#LOOP_END.all}

</body>

-> Now, create a email template where configure above report.

-> In Template Helper, 'Reports' option will be there under 'Helpers' section. And select the report which is created above.

-> Use that token and create template.

Ex: {!#REPORT.20077#body}

Hope this helps.

Thanks and Regards,

Chandra.G

Posted by Sudhakar on 05-Sep-2014 12:05

thanks,for reply

Can you please let me know how can i attach only related files (PDF).i.e when i have taken action on specific client then it will send mail to that client.in that mail i need to attach  PDFs related to that client.But now it is attaching all clients files.

As shown Below SS for  "template,test email" client we need to attach only 11 PDF,but now it is attaching all PDF.


And this is the mail user got



Posted by Sudhakar on 05-Sep-2014 12:32

and the relation b/w client to  attachments is "One Client to Many Attachments"

Posted by Sudhakar on 05-Sep-2014 15:04

got solution,we need to use template text to get my requirement

This thread is closed