Hello,
I'm just getting start on Suitelets and need some help:
In one of our Client Scripts when the user clicks on a button they are prompted to enter a date which is then processed by the script to update the record.
Currently I'm using a Javascript prompt() together with nlapiStringToDate, but for better usability I'd like to replace this with a datepicker using NetSuite's UI elements.
I got as far as creating and deploying the following Suitelet script:
function selectDateForm(request, response) { if(request.getMethod() == 'GET') { var dateForm = nlapiCreateForm('Select Date', true); dateForm.addField('custpage_newdate', 'date'); dateForm.addSubmitButton(); response.writePage(dateForm); } else dumpResponse(request, response); }But now I'm at a loss how to open the Suitelet in a popup and return the entered date to a variable in the Client Script.I can get a button to open the Suitelet in a popup, but when clicking the Save button the popup window redirects and displays an error:ReferenceError: "dumpResponse" is not defined.
Instead I want the popup to return the entered date and close itself.