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.
How does one submit files through a SuiteScript 2.0 Suitelet?
I'm having issues with serverWidget.FieldType.FILE. I need to be able to submit a file with a form from a Suitelet, and I seem to be at a dead end. Has anyone else figured out how to do this in SuiteScript 2.0 yet? Any help is appreciated.
If I do this...
form.addField({ id: 'custom_file', type: serverWidget.FieldType.FILE, label: 'File Upload' });...I get the expected file input, but upon submitting the form, context.request.parameters.custom_file is undefined. Of course, if I do this instead...
form.addField({ id: 'custom_text', type: serverWidget.FieldType.TEXTAREA, label: 'Text Area' }); 0