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!
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