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
Proposals
A
Signature
record.detach(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.detach({2    record:     /* record.Record, required */,3    from:       /* record.Record, required */,4    attributes: /* Object, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.recordrecord.RecordrequiredThe record to be detached.
options.record.typestringrequiredThe type of record to be detached. Set this value using the record.Type enum.
options.record.idnumber | stringrequiredThe ID of the record to be detached.
options.fromrecord.RecordrequiredThe destination record that options.record should be detached from.
options.from.typestringrequiredThe type of the destination. Set this value using the record.Type enum.
options.from.idnumber | stringrequiredThe ID of the destination.
options.attributesObjectoptionalName-value pairs containing default values of fields in the new record. By default, this value is null.
B

No Mynt syntax yet.

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

C

Competing syntax for detach, 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.detach(options)

Suggest syntax for detach