Connection.list Method Parameters Update in NetSuite 2026.1

The Connection.list method in NetSuite 2026.1 enhances parameters for remote directory listings and file management.

·2 min read·3 views·NetSuite 2026.1·View Oracle Docs

The Connection.list method is an essential part of the N/sftp module, allowing users to list remote directories effectively. Starting in NetSuite 2026.1, there have been updates to the parameters used in this method, enhancing the functionality and flexibility of file management.

Overview of Connection.list

This method returns an array of Objects, each containing properties relevant to files and directories within the specified path, including:

  • directory: A boolean flag indicating whether the entry is a directory (true) or a file (false).
  • name: The name of the file or directory.
  • size: The size of the file.
  • lastModified: The date the file was last modified.

Updated Parameters

The options parameter is a JavaScript object with the following required fields:

ParameterTypeDescription
options.pathStringRequired. The relative path to the directory of the file that will be downloaded.
options.sortStringRequired. The sort options available from the sftp.Sort module.

Error Handling

When using the Connection.list method, it is essential to handle potential errors:

  • FTP_INVALID_DIRECTORY: This error occurs if the specified directory does not exist on the remote FTP server.
  • FTP_PERMISSION_DENIED: This indicates that access to the specified file or directory has been denied.

Example Syntax

The following code sample illustrates how to utilize the Connection.list method:

suitescript
let objConnection = connection.list({
path: 'yyy/test',
sort: 'name'
});

Key Improvements

This update not only strengthens the capability of listing remote directories but also ensures that developers can more efficiently manage file transfers within their SuiteScripts.

Who This Affects

The updates to the Connection.list parameters will particularly benefit:

  • SuiteScript Developers
  • System Administrators managing SFTP integrations
  • Anyone working with remote file systems in NetSuite

Key Takeaways

  • The Connection.list method now supports enhanced parameters for better file management.
  • Error handling has been clarified for improved robustness.
  • SuiteScript developers will find these updates beneficial for their coding tasks in NetSuite.

Frequently Asked Questions (4)

Do I need to modify existing SuiteScripts using the Connection.list method after updating to NetSuite 2026.1?
Yes, you may need to update existing SuiteScripts to incorporate the new parameters, specifically ensuring that the 'options.path' and 'options.sort' parameters are correctly implemented as these are now required.
What error might I encounter if the specified directory in Connection.list does not exist on the remote server?
If the specified directory does not exist on the remote server, you will encounter the 'FTP_INVALID_DIRECTORY' error.
How can I prioritize the sorting of results in the Connection.list method?
To control sorting, use the 'options.sort' parameter with options available from the 'sftp.Sort' module.
Is the Connection.list method update applicable to standard NetSuite or specific to SuiteScript developers only?
This update is specifically relevant to SuiteScript developers who work with the N/sftp module for file management and remote directory listings within NetSuite.

Weekly Update History (1)

SuiteScriptupdated

Updated Connection.list(options) to include the maximum number of results that the method can return.

View Oracle Docs
Source: Parameters Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteScript

View all SuiteScript articles →

Also from NetSuite 2026.1

View all NetSuite 2026.1 changes →