hello I am working on writing a file script, while uploading script got this error
Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"missing ; before statement (SS_SCRIPT_FOR_METADATA#20)","stack":[]}
script:
/**
*@NApiVersion 2.x
*@NScriptType Suitelet
*/
define(['N/file', 'N/record'], function(file, record) {
// Create a file containing text
var fileObj = file.create({
name: 'MH_writefile.txt',
fileType: file.Type.PLAINTEXT,
contents: 'Hello Netsuite\nHello Pakistan'
});
// Set the folder for the file
fileObj.folder = 293909;
// Save the file
let id = fileObj.save();
// Load the same file to ensure it was saved correctly
fileObj = file.load({
id: id
});
});