How do I create a new folder in SuiteScript 2.0 and save it to the file cabinet?
var folder = record.create({
type: record.Type.FOLDER,
});
folder.save()
What am I missing?
Here's a snippet which creates a folder using SS2.0:
var objRecord = record.create({
type: record.Type.FOLDER,
isDynamic: true
});
objRecord.setValue({
fieldId: 'name',
value: 'Test Folder'
});
var folderId = objRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With