module function · N/record

attach()

record.attach(options)

Attaches a record to another record.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
record.attach(options)
Module
N/record
Returns
void
Governance
10 units
Script types
Client and server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1record.attach({2    record:     /* record.Record, required */,3    to:         /* record.Record, required */,4    attributes: /* Object, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.recordrecord.RecordrequiredThe record to attach. Note: The record must be active.
options.record.typestringrequiredThe type of record to attach. Set this value using the record.Type enum. To attach a file from the File Cabinet to a record, set type to file .
options.record.idnumber | stringrequiredThe internal ID of the record to attach.
options.torecord.RecordrequiredThe record that the options.record gets attached to.
options.to.typestringrequiredThe record type of the record to attach to. Set the value using the record.Type enum. To attach a file from the File Cabinet to a record, set type to file .
options.to.idnumber | stringrequiredThe internal ID of the record to attach to.
options.attributesObjectoptionalThe name-value pairs containing attributes for the attachment. By default, this value is null.
B

No Mynt syntax yet.

Nothing in the language compiles to record.attach(options) today. How should it read?

C

Competing syntax for attach, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

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/record · record.attach(options)

Suggest syntax for attach