RE: I want to send the PDF through email to the customer

I have created a Custom Record and then immediate a PDF form is created in

Customization > Forms > Advanced PDF / HTML Templates.

Now I want to send a PDF templated attached with email to the customer.

ashwinji Rookie Asked on November 22, 2021 in SuiteScript.
Add Comment
1 Answers

You have two options.

  1. Either customize the form and set your template PDF template.
    Customiztion –> Forms –> Transaction Form. Select your form.
    Change the Advanced Pdf template to your new generated one.
  2. Using Scripting: You can use render module alongside the Email Module.
    Create a script. Load Render Module. Call render.transaction(options) : Return file.File that contains a PDF or HTML document
    then use email module to send email and attach your transaction.

    email.send({
    author: userId,
    recipients: userId,
    subject: ‘Search completed’,
    body: ‘CSV file attached, ‘ + noOfRows + ‘ record(s) found.’,
    attachments: [tranasction object that you created from render]
    });

Beginner Answered on November 22, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.