CurrentRecord.getSubrecord(options)
Method Description |
Gets the subrecord associated with the field. If the subrecord does not exist, a new subrecord is created and returned. |
Returns |
|
Supported Script Types |
Client scripts For more information, see SuiteScript 2.x Script Types.
Note:
Setting values of Inventory Detail subrecord is currently not supported in Client scripts since the subrecord object in this context is only available in view-mode. |
Governance |
None |
Module |
|
Since |
2016.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The internal ID of a standard or custom body field. |
2016.2 |
Errors
Error Code |
Thrown If |
---|---|
|
The specified field is disabled. |
|
The specified field is not a subrecord field. |
|
The specified fieldId does not refer to a subrecord. |
|
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/currentRecord Module Script Samples.
//Add additional code
...
var sublistFieldValue = objRecord.getSubrecord({
fieldId: 'subrecord'
});
...
//Add additional code