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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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