When a user clicks "Merge and Send" on an Email me...
# ask-stanley-ai
a
When a user clicks "Merge and Send" on an Email message they created from an Invoice, the Invoice PDF attached to the email message gets a long series of digits suffixed to the filename. How can I change that so the filename only has the transaction type and transaction number in its name? The long series of digits at the end of the filename is a timestamp, not the internal ID.
c
AI generated answer (using internal Slack threads):
The long series of digits suffixed to the filename when you click "Merge and Send" on an Email message created from an Invoice in NetSuite is a timestamp, not the internal ID. To change the filename to only have the transaction type and transaction number, you would need to use SuiteScript. When you render the file as a PDF, you can set the name of the file. Here is a sample code snippet:
Copy code
javascript
var emailPDF = renderFileRec.renderAsPdf();
emailPDF.name = pdfnam + '.pdf';
In this code,
renderFileRec
is the file you want to render as a PDF, and
pdfnam
is the new name you want to give to the file. Please note that this solution requires a good understanding of SuiteScript and might need to be adjusted based on your specific needs. ****** 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.837341368
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830505431
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829345822
Please provide your feedback on this answer.