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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
Add button to pop up Suitelet in new window
Hi all,
I'm trying to add a button to the sales order on a before load script that will pop up a suitelet in another window. Maybe I just have some syntax wrong, or a misplaced quote, but the button doesn't do anything when it is clicked.
Here is my code:
var stSuiteletUrl = nlapiResolveURL('SUITELET',103,1); stSuiteletUrl += '&tranID=' + tranID; stSuiteletUrl += '&template=' + template; stSuiteletUrl += '&customerID=' + customerID; stSuiteletUrl += '&toemail=' + toemail; stSuiteletUrl += '&subject=' + subject; stSuiteletUrl += '&authcodes=' + authcodes; stSuiteletUrl += '&ordertype=' + ordertype; stSuiteletUrl += '&ccemail=' + ccemail; stSuiteletUrl += '&bccemail=' + bccemail; windowProperties = ''Send Auth Codes', 'dependent=yes, height=650, width=450, top=100, left=200, toolbar=no, scrollbars=yes, menubar=no, status=no, titlebar=no, resizable=yes, location=no'; nlapiLogExecution('DEBUG','Suitelet URL: ', stSuiteletUrl); nlapiLogExecution('DEBUG','Window Properties: ', windowProperties); nlapiLogExecution('DEBUG','Full Statement: ', 'window.open('' + stSuiteletUrl + '',' + windowProperties + ');'); form.addButton('custpage_email_auth_codes','Email Auth Codes','window.open('' + stSuiteletUrl + '',' + windowProperties + ');'); 0