record.detach(options)
Method Description |
Detaches a record from another record.
Note:
For the promise version of this method, see record.detach.promise(options). Note that promises are only supported in client scripts. |
Returns |
void |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
required |
The record to be detached. |
2015.2 |
|
|
string |
required |
The type of record to be detached. Set this value using the record.Type enum. |
2015.2 |
|
number | string |
required |
The ID of the record to be detached. |
2015.2 |
|
required |
The destination record that |
2015.2 |
|
|
string |
required |
The type of the destination. Set this value using the record.Type enum. |
2015.2 |
|
number | string |
required |
The ID of the destination. |
2015.2 |
|
Object |
optional |
Name-value pairs containing default values of fields in the new record. By default, this value is null. |
2015.2 |
Errors
Error Code |
Thrown If |
---|---|
|
A required argument is missing or undefined. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/record Module Script Samples.
// Add additional code
...
record.detach({
record: {
type: 'file',
id:'200'
},
from: {
type: 'customer',
id:'90'
}
})
...
// Add additional code