Not sure if this is the right place to post but I ...
# suitescript
h
Not sure if this is the right place to post but I am running into an email issue when I try to pull the item_display. All the other quote sublist values pull with ease but nothing displays for this value? Anyone know how to get the item sku used on the quote to display in an email html lang="en"
Copy code
<head>
<style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            background-color: #2E2E2E;
            color: #D7D7D7;
        }

        .wrapper {
            margin: 0 auto;
            padding: 0;
            text-align: center;
            background-color: #2E2E2E;
        }

        .header {
            background-color: #2E2E2E;
            padding: 25px;
        }

        .content {
            background-color: #292929;
            padding: 25px;
            color: #D7D7D7;
        }

        .footer {
            background-color: #2E2E2E;
            padding: 25px;
            font-size: 12px;
        }

        a {
            color: #71B0FF;
            text-decoration: none;
        }

        table.quote-details {
            width: 100%;
            margin-top: 20px;
            border-collapse: collapse;
        }

        table.quote-details, table.quote-details th, table.quote-details td {
            border: 1px solid #D7D7D7;
        }

        table.quote-details th, table.quote-details td {
            padding: 8px;
            text-align: left;
        }

        table.quote-details th {
            background-color: #333;
        }

        @media screen and (max-width: 660px) {
            table[class="responsive-table"] {
                width: 100% !important;
            }
        }
    </style>
</head>
<body>
<div class="wrapper">
<table width="100%">
<tbody>
<tr>
<td align="center">
<table class="responsive-table" width="660">
<tbody>
<tr>
<td class="header"><a href="###" target="_blank" rel="noopener noreferrer"> <img style="border: 0; height: auto; line-height: 100%; outline: none;" src="###" alt="### Logo" width="180" border="0" /> </a></td>
</tr>
<tr>
<td class="content">
<p>Dear ${transaction.entity},</p>
<p>Your quote (Quote ID: ${transaction.tranid}) is set to expire in 7 days. <br /><br />Please review your quote and finalize your purchase before this date to take advantage of your guaranteed rates.</p>
<p>Quote Summary:</p>
<table class="quote-details">
<thead>
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Description</th>
<th>Price</th>
</tr>
</thead>
<tbody><#if transaction.item?has_content && transaction.item?size gt 0> <#list transaction.item as item>
<tr>
<td>${item.item_display}</td>
<td>${item.quantity}</td>
<td>${item.description}</td>
<!-- New field -->
<td>${item.rate}</td>
</tr>
</#list> <#else>
<tr>
<td colspan="4">No items found</td>
</tr>
</#if></tbody>
</table>
<p>For any questions or further assistance, feel free to contact us.</p>
<p>Kind regards,</p>
<p>The ### Team</p>
</td>
</tr>
<tr>
<td class="footer">This is an automated message, all replies will go directly to your assigned sales rep. For general inquires you can reach out to <a href="mailto:sales@###.com">sales@###.com</a><br /><br />© ### Inc</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Debugging information -->
</body>
</html>
Figured it out, just gotta use the item.item instead of the quote field id SMH
j
Hi, I ran today into the issue with adding item information (from sales orders) into email template. I followed suiteanswer n. 98005 where I pasted the code into email template but getting error when saving the template (Syntax error in template "contact" in line .... Lexical error: encountered "\u200c" (8204), after "". Parse exepion during template merging." Any idea please what is wrong? Thank you