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.
Giving a function inside a suitelet
Hi All,
I have a suitelet with a button. In clicking the button i need to invoke a function. In which part of the script should i give the function? Following is the script. My function is not invoked. Can anyone pls help me?
function addUsingSuitelet() { if ( request.getMethod() == 'GET' ) { var form = nlapiCreateForm('Simple Form'); var createNewReqLink = form.addField('custpage_new_req_link','inlinehtml', null, null,'machine'); createNewReqLink.setDefaultValue('<input type = "button" value = "Show corresponding items" onclick = "showFunction()">'); response.writePage( form ); function showFunction() { var url_suitelet = nlapiResolveURL('SUITELET',5,1); var win_handle = window.open(url_suitelet); } } } 0