eamil template

Email Templates: Printing Transaction Lines and Item details

Print Transaction Lines and Item details with NetSuite Email Templates

We recently had a customer case related to transaction email template, specifically for when sending emails including item-related information. To give some more context the email in question was automatically sent via workflow whenever a new item fulfillment transaction was saved in the system. The email sent to the receiving customer included information about the order number, tracking link(s) as well as more detailed information about the shipped items such as name, description, quantity, GTIN as well as an image of the item.

As with Advanced PDF/HTML templates you can list transaction items in an email template using the FreeMarker <#list> directive. What we discovered however was that when we tried to fetch information from the joined item field in the item sublist, specially the item image and the GTIN, the email template returned the results for the first item line also for the subsequent lines.

Email template

To manage this we created one new field on the item record used to store the URL of the item image and two new transaction line fields applied to the item fulfillment transaction type. The transaction line fields were then sourced (non-store) from the item and its equivalent fields. In the email template we printed the new transaction line fields and thus resolved the issue.

To make it even easier, we added one of our utility bundles. This particular bundle includes a script that will automatically fetch the NetSuite-generated URL from the image and place it in a field of your choice. With this solution you then only need to select the image you want and the result will work automatically.

We at SuiteCorner have long experience of NetSuite and developing solutions, both big and small, that makes your daily NetSuite life easier. Make sure to visit our website to read more about some of our solutions and how we can help you.

Best Regards
Simon

 

 

See more blog posts