module function · N/record
detach()
record.detach(options)
Detaches a record from another record.
- Implementation
- Not started
- Design
- Open for proposals suggest how it should read
A
suitescript api
1record.detach({2 record: /* record.Record, required */,3 from: /* record.Record, required */,4 attributes: /* Object, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.record | record.Record | required | The record to be detached. |
| options.record.type | string | required | The type of record to be detached. Set this value using the record.Type enum. |
| options.record.id | number | string | required | The ID of the record to be detached. |
| options.from | record.Record | required | The destination record that options.record should be detached from. |
| options.from.type | string | required | The type of the destination. Set this value using the record.Type enum. |
| options.from.id | number | string | required | The ID of the destination. |
| options.attributes | Object | optional | Name-value pairs containing default values of fields in the new record. By default, this value is null. |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to record.detach(options) today. How should it read?
C
community proposals
Competing syntax for detach, 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?