How to upload a file from local to NetSuite file cabinet using SuiteScript 2.0
问题 How can I upload my files to NetSuite file cabinet using SuiteScript 2.0? 回答1: A possible option is to create a Suitelet with a Document field and save the file uploaded to that field. Here's the code for such a Suitelet: /** *@NApiVersion 2.x *@NScriptType Suitelet */ define(['N/ui/serverWidget'], function(serverWidget) { function onRequest(context) { if (context.request.method === 'GET') { var form = serverWidget.createForm({ title: 'Simple Form' }); var field = form.addField({ id: