How can I automatically attach files uploaded via ...
# ask-stanley-ai
c
How can I automatically attach files uploaded via file drag & drop onto a transaction email, such as an invoice? The files appear within the 'files' subtab prior to send.
c
AI generated answer (using internal Slack threads):
To automatically attach files uploaded via file drag & drop onto a transaction email, such as an invoice, you would need to use SuiteScript. Unfortunately, there are no direct code samples provided in the threads, but the general approach would be as follows: 1. You would need to search for the attached files on the transaction record. This can be done using the
record.load
or
record.get
methods in SuiteScript to load the transaction record and then access the 'files' subtab. 2. Once you have the file references, you can use the
email.send
or
email.sendBulk
methods in SuiteScript to send the email. These methods allow you to specify file attachments. 3. In the email send method, you would specify the file references obtained in step 1 as attachments. Please note that this approach requires familiarity with SuiteScript and the NetSuite API. You would need to write a script that performs these steps and then schedule this script to run as per your requirements. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.870255888
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835669458
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835578859
Please provide your feedback on this answer.