module function · N/file

load()

file.load(options)

Loads an existing file.File from the NetSuite File Cabinet.

Implementation
Implemented in the compiler, not yet published
Design
Accepted load File(id)
Proposals
A
Signature
file.load(options)
Module
N/file
Returns
file.File
Governance
10 units
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1file.load({2    id: /* number | string, required */3});
Oracle reference for this method
ParameterTypeRequiredDescription
options.idnumber | stringrequiredThe identifier of a file in the File Cabinet. To specify a file in the File Cabinet, you can pass one of the following as the value of this parameter: The internal ID of the file as a number or string The absolute file path to the file in the File Cabinet (for example, 'Images/myImageFile.jpg' ) The relative file path to the file in the File Cabinet (for example, './Images/myImageFile.jpg' to specify a file path relative to the current folder of your script, or '../Images/myImageFile.jpg' to specify a file path relative to the parent folder of your script) To find the internal ID of the file in the UI, select Documents > Files > File Cabinet .
B

Supported syntax · compiles today

myntload File(id)
let file = load File(456)
suitescriptoutput, trimmed
1const file = file$.load({2    id: 4563});

File is opaque so far: it can be loaded and held, but its contents and properties are not modeled yet, and it cannot be a function parameter. The module is bound as file$ so a local can be called file. In the compiler, not yet published: npm 0.1.0 does not have it. Verified with mynt build on 13 Oct 2026.

C

Competing syntax for load, from GitHub Discussions. Select two or more to compare them side by side, with the syntax Mynt supports today as a baseline.

All discussions
Mynt todaylet file = load File(456)

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/file · file.load(options)

Suggest syntax for load