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.
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:
| Parameter | Type | Description |
|---|---|---|
options.path | String | Required. The relative path to the directory of the file that will be downloaded. |
options.sort | String | Required. 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:
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?
What error might I encounter if the specified directory in Connection.list does not exist on the remote server?
How can I prioritize the sorting of results in the Connection.list method?
Is the Connection.list method update applicable to standard NetSuite or specific to SuiteScript developers only?
Weekly Update History (1)
Updated Connection.list(options) to include the maximum number of results that the method can return.
View Oracle DocsWas this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
Also from NetSuite 2026.1
- Custom Tool Script Enhancements in NetSuite
NetSuite 2026.1 enhances custom tool scripts with execution logs, a new management page, and binary file support. TL;DR Opening
- Unlimited Sandbox Refreshes in NetSuite 2026.1
Starting in NetSuite 2026.1, sandbox accounts can be refreshed an unlimited number of times, enhancing testing capabilities.
- Enriched Bank Data for Improved Transaction Matching in NetSuite
Updated for NetSuite 2026.1: Enriched Bank Data feature enhances transaction matching accuracy using generative AI.
- Natural Language Queries in NetSuite AI
Updated for NetSuite 2026.1, featuring enhancements in natural language queries. The MCP Standard Tools SuiteApp offers enhanced AI-driven interaction with
