Search code examples
netsuitesuitescript2.0suitetalk

How to get transaction PDF in NetSuite


I'm able to get transaction internal id by suitetalk api, but it doesn't have API to get transaction in PDF format.

Would anyone help me in this case?


Solution

  • Here is an example of the email.send to attach a file. I don't currently have a NetSuite account to log into, but the 2.0 code below is an example of the email.send module that you can use to email the record(s). If you search that in the NS docs, you'll find more examples, as well.

    email.send({
      author:emailAudthorNSID, 
      recipients:emailRecipientNSID, 
      subject:'Example email subject', 
      body:'Example Email Body', 
      relatedRecords:{
        transactionId:transactionRecordToAttach
      }
    });