Modifying SuiteCloud Project File and Folder Attributes in an XML Definition

In SuiteCloud Development Framework (SDF), when you use a SuiteCloud SDK tool to create a file or folder in the File Cabinet of your SuiteCloud project, an XML file is automatically created in a .attributes subfolder. The XML file contains attributes for the file or folder.

When you create a file or folder in the File Cabinet of your SuiteCloud project using a tool other than SuiteCloud IDE, you must also create the attribute file and folder manually.

File Attributes

File attributes are stored in an XML file located inside a .attributes folder. That .attributes folder is located in the same folder as the File Cabinet file. For example, if the File Cabinet file is located in the SuiteScripts folder, the .attributes folder is also located in the SuiteScripts folder.

The filename for the attributes file is of the form filename.attr.xml, where filename is the filename for a File Cabinet file. For example, the file UserEventScript.js has a corresponding attribute file UserEventScript.js.attr.xml in the .attributes folder.

Consider the following when working with files attributes in SDF:

  • Attribute files for File Cabinet files and their parent folder are located in the same .attributes folder.

  • In account customization projects, attributes for files are located in subdirectories of the FileCabinet/SuiteScripts folder.

  • In SuiteApp projects, attributes for files are located in subdirectories of the FileCabinet/SuiteApps folder.

  • Only store file attributes in the .attributes folder. Other files that are stored in the .attributes folder are not deployed.

  • For information about uploading files to a NetSuite account, see Uploading Files to the File Cabinet.

  • When adding files to the Marketing Templates folder, you must specify the Marketing Automation feature as a dependency in the manifest

File attributes are represented by following fields for the file element:

Field

Type

Description

availablewithoutlogin

boolean

Sets the file to be accessible externally. The file can be accessed with a URL that points to the file record.

The value F sets the file to be only accessible to those who are logged in to NetSuite with permission to view File Cabinet documents.

The default value is F.

Note:

When the Web Site Hosting Files Always Available general company preference is enabled and the SuiteApps folder contains subfolders with two periods in the folder name, files in those subfolders are accessible externally, even when the availablewithoutlogin attribute is set to F for those files. For example, /SuiteApps/folder1.1.2/file.txt.

bundleable

boolean

Includes the file in a bundle.

If you include this file in a bundle, setting the value to F does not remove the file from the bundle. To remove the file from a bundle, update the bundle and remove the file.

The default value is F.

description

string

Provides a description for the file. The description only appears on the file record.

By default, the value is empty.

generateurltimestamp

boolean

Adds a time stamp parameter to the URL for the file.

This is useful when you are building a web site, and you want to view the most recent updates to the files on your site.

The URL time stamp is ignored by NetSuite, but indicates to the browser cache and network that content has changed.

The default value is F.

hideinbundle

boolean

Hides the file, preventing anyone who installs the bundle from accessing the file in the target account. This attribute corresponds to the Hide in SuiteBundle box in the NetSuite File Cabinet.

The hideinbundle attribute cannot be used to hide client script SuiteScript files.

The default value is F.

isinactive

boolean

Indicates that the file is inactive.

The file only appears to users on lists if Show Inactives is enabled in the NetSuite UI.

The default value is F.

File Attributes

The following example is an XML definition of a file attributes:

              <file>

  <availablewithoutlogin>T</availablewithoutlogin>

  <bundleable>T</bundleable>

  <description>User event script.</description>

  <generateurltimestamp>T</generateurltimestamp>

  <hideinbundle>F</hideinbundle>

  <isinactive>F</isinactive>

</file> 

            

Folder Attributes

Folder attributes are stored in a folder.attr.xml file in a .attributes folder. There is a .attributes folder for each File Cabinet subfolder. For example, if you create a UserEventScripts folder in the File Cabinet of your SuiteCloud project, it must contain a .attributes folder that contains a .folder.att.xml file.

Consider the following when working with folder attributes in SDF:

  • In account customization projects, attributes for folders are located in subdirectories of the FileCabinet/SuiteScripts folder.

  • In SuiteApp projects, attributes for folders are located in subdirectories of the FileCabinet/SuiteApps folder.

  • System folder attributes cannot be modified. You can only modify attributes for subfolders of the FileCabinet/SuiteScripts and FileCabinet/SuiteApps folders.

  • To be deployed, subfolders must be located either in FileCabinet/SuiteScripts or FileCabinet/SuiteApps.

  • Attribute files for File Cabinet files and their parent folder are located in the same .attributes folder.

  • System folders such as SuiteScripts and SuiteApps do not have their own folder attributes.

  • For information about creating folders in a NetSuite account, see Creating File Cabinet Folders.

Folder attributes are represented by following fields for the folder element:

Attribute

Type

Value

bundleable

boolean

Includes the folder in a bundle.

If you include this folder in a bundle, setting to F does not remove the folder from the bundle. To remove the folder from a bundle, update the bundle and remove the folder.

The default value is F.

description

string

Provides a description for the folder. The description only appears on the folder record.

By default, the value is empty.

isinactive

boolean

Indicates that the folder is inactive.

The folder only appears to users on lists if Show Inactives is enabled in the NetSuite UI.

The default value is F.

isprivate

boolean

Specifies that the contents of this folder visible to the folder creator and the account administrator.

The default value is F.

Folder Attributes

The following example is an XML definition of folder attributes.

              <folder>

  <bundleable>F</bundleable>

  <description>This folder contains all of the user event scripts.</description>

  <isinactive>F</isinactive>

  <isprivate>F</isprivate>

</folder> 

            

Related Topics

SDF Custom Object and File Development in SuiteCloud Projects
Developing SDF Custom Objects
SuiteScript Files in SuiteCloud Projects
Installation Preferences in the SuiteApp of SuiteCloud Project

General Notices