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.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
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