This started as of this past Friday (9/14) but I had to be sure I was seeing what I was seeing. This code was working for the past years without issue.
When I setup a suitelet with a file upload field and then attempt to read the value of this file in the suitelet it throws the following error:
java.lang.NullPointerException: charsetName
I have tested this with various file types from XML, HTML, and a simple 'Hello World' text file, all with the same results. I even wrote a simple file upload suitelet to test (in case my code had other errors causing a side-effect).
The test code:
function cstestSuitelet(request,response) { var form, fld, val; if ( request.getMethod()=='GET' ) { form = nlapiCreateForm('My Test Upload'); fld = form.addField('custpage_myfile','file','Select File'); fld = form.addSubmitButton('Submit'); response.writePage(form); } else { // read the file from the request object fld = request.getFile('custpage_myfile'); nlapiLogExecution('AUDIT','Reading in file', 'file object = '+fld); try { val = fld.getValue(); } catch(e) { val = (e.message?e.message:e); } nlapiLogExecution('AUDIT','Reading File Value','Value = '+val); } } Within the logging I see the following: AUDIT | Reading in file | file object = nlobjFileAUDIT | Reading File Value | Value = java.lang.NullPointerException: charsetName This appears to be a bug introduced perhaps in the most recent updates and is causing serious production issues as the client is using this functionality to import special files into NetSuite records (note that the client's upgrade to 2012.2 occurred a week prior so this was not introduced with the upgrade as far as I can see). Is anyone else experiencing this?