Emails are very important in the business world. NetSuite provides great functionality for transaction messages, but did you know there are ways to make what’s good even better?

Run a script when a message is created

This past week, we worked with a client on a project related to the Messages tab on a Purchase Order. They needed to have a box checked whenever an email was sent to the supplier and another box checked when they received a reply back from the supplier. Building a custom script to automate this process enabled them to track which Purchase Orders had been emailed to the supplier and which had been acknowledged and replied to by the supplier. This is all made possible through the SuiteScript API that allows scripts to initiate on the creation of NetSuite messages (emails). We were able to determine if an email related to a given PO had been sent internally from the company or had been received externally from a supplier. Logic in the script would then determine the correct checkbox field on the record to mark.

Send an email when a script is run

Alternatively, it is also possible to send emails from a script, and have that script run at certain important moments in a workflow. Occasionally we will need a script to initiate when a box is checked on a record. For example, we could have a checkbox called “Send PO to Supplier” on a Purchase Order. When the user checks this box on create or edit of the record and saves, the script will send an automated email with an attachment of the Purchase Order.


There are many ways to improve workflows related to NetSuite messages. If you have an idea in mind to help improve your company’s workflow, reach out to us for a free consultation. We would love to help out!

Would love your thoughts, please comment.x