Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a folder in the file cabinet in SuiteScript 2

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?

like image 523
Morris S Avatar asked Oct 27 '25 13:10

Morris S


1 Answers

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
        });
like image 57
Maria Berinde-Tampanariu Avatar answered Oct 29 '25 18:10

Maria Berinde-Tampanariu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!