Site Builder > Prevent Web Site Tags from Rendering Blank Content

Written by
Ryan
Published on
June 23, 2023 at 1:01:50 AM PDT June 23, 2023 at 1:01:50 AM PDTrd, June 23, 2023 at 1:01:50 AM PDT

Scenario

Users have an option to modify or add more details into transaction emails that are sent out by NetSuite, particularly those that are listed under (Administrator) Commerce > Web Site List > Edit > Email sub tab.

Solution

This is through using Web Site Tags:

<%=getCurrentAttribute("salesorder","otherrefnum")%>
<%=getCurrentAttribute("salesorder","shipmethod")%>
<%=getCurrentAttribute('customer','email')%>
<%=getCurrentAttribute('customer','salesrep')%>

Notice the quotations that were used were both single and double. Both can be used alternatively however if used together the tags will render blank like the following:

As best practice, users should stick to one type of quotation to avoid this kind of behavior.

<%=getCurrentAttribute("salesorder","shipmethod")%>
<%=getCurrentAttribute('customer','email')%>