Hi,
I am new to Suitelets and was hoping someone could point me in the right direction.
I have created a Suitelet which is called from a custom action (button) on a customer form. The idea is the user will click on this button on the customer form and will be taken to my Suitelet form to enter information. At this point I am just trying to figure out how to create a form through a Suitelet. I took some code out of SuiteAnswers to test, but immediately received an error. The error is, "JS_Exception TypeError Cannot read property 'getMethod' of undefined. I have tried Googling and looking on SutieAnswers for other examples / explanation, but haven't really found anything that is helpful. Could someone just point me in the right direction on this one?
function htmlSuitelet(request, response) { if ( request.getMethod() == 'GET' ) { var form = nlapiCreateForm('Simple Form with Button'); var script = "alert('Hello World')"; form.addButton('custombutton', 'Click Me', script); response.writePage( form ); } else{ dumpResponse(request,response); } }