File.folder

Property Description

The internal ID of a file’s folder within the NetSuite File Cabinet.

Before you upload a file to the NetSuite File Cabinet with File.save(), you must set its File Cabinet folder with the folder property.

Type

number | string

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/file Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/file Module Script Samples.

          //Add additional code 
...
var fileObj = file.create({
    name: 'test.txt',
    fileType: file.Type.PLAINTEXT,
    contents: 'Hello World\nHello World'
});
fileObj.folder = 30;
var fileId = fileObj.save();
...
//Add additional code 

        

Related Topics

General Notices