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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
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