Attachment Multiple in Email/PDF templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashif Malayil
    Senior Member
    • Dec 2023
    • 208

    #1

    Attachment Multiple in Email/PDF templates

    Hi,

    How can I include a multiple attachment field in an Email or PDF template? I previously used {{#each testField}} to include a multiple link field in a template. Is there a similar way to include a multiple attachment field in these templates?
  • victor
    Active Community Member
    • Aug 2022
    • 919

    #2
    Ask in the developer section, because through the UI only for Email Template you can add files directly to the template, rather than adding these files from a specific field created in a specific entity.
    It is better to provide access to files through the Portal.

    Comment

    • dreginald
      Senior Member
      • Sep 2018
      • 146

      #3
      You can use formula script to create mails with many PDF attachments, Applying an Email Template and Send.

      Suggest use BPM tool with script action since workflows are generating two emails per trigger (in version 6.)

      Example of script attached

      $attachmentId = ext\pdf\generate(
      'SalesOrder', entity\attribute('id'), '60436420a43565f7', 'Sales Order.pdf'
      );

      $attachmentId1 = ext\pdf\generate(
      'SalesOrder', entity\attribute('id'), '6079b1cc8b505960696', 'Quote.pdf'
      );


      $emailId = record\create('Email',
      'to', 'abc@xyz.com',
      'attachmentsIds', list($attachmentId, $attachmentId1),
      'parentId', entity\attribute('id'),
      'parentType', 'SalesOrder'
      );
      // applying email template
      ext\email\applyTemplate($emailId, '6789909004sdr5');

      ext\email\send($emailId);

      Comment

      Working...