Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Reading/Loading a file from File Cabinet
When it is required to work with a file from File Cabinet, users can use file.load(options) of N/file module. Previously, users could load a file by either specifying the internal ID of the file or the absolute file path to the file in the File Cabinet. In 2019.2, we can now specify a relative file path when loading a file. Relative file paths always start with ./ or ../. Below are some examples:
- internal ID of the file as a number or string
var fileObj = file.load({ id: 1234});- absolute file path to the file in the File Cabinet
var fileObj = file.load({ id: 'CSV Files/CompanyOrders.csv'});
Tagged:
0