Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Passing JavaScript Variables to getCurrentAttribute
I believe that the way I am trying to achieve my desired result is not possible in NetSuite, but I am hoping someone may have found a workaround:
Our client has several custom item fields for swatches. Here is a Javascript snippet I am using to display the swatch (using tags):
swatch = "<%=getCurrentAttribute('item','custitemswatch2')%>"; if (swatch.length > 0) {document.write("<td><a onclick=swapImage('<%=getCurrentAttribute('item','internalid')%>','" + swatch + "')> <img width='80' height='80' src='<%=getCurrentAttribute('item','custitemswatch2')%>' alt='<%=getCurrentAttribute('item','custitemswatch2_alt')%>' title='<%=getCurrentAttribute('item','custitemswatch2_alt')%>'></a></td>"); } document.write("</tr><tr>"); 0