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
A
suitescript api
1record.attach({2 record: /* record.Record, required */,3 to: /* record.Record, required */,4 attributes: /* Object, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.record | record.Record | required | The record to attach. Note: The record must be active. |
| options.record.type | string | required | The 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.id | number | string | required | The internal ID of the record to attach. |
| options.to | record.Record | required | The record that the options.record gets attached to. |
| options.to.type | string | required | The 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.id | number | string | required | The internal ID of the record to attach to. |
| options.attributes | Object | optional | The name-value pairs containing attributes for the attachment. By default, this value is null. |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to record.attach(options) today. How should it read?
C
community proposals
Competing syntax for attach, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?