Record.getValue(options)
Method Description |
Returns the value of a field. (dynamic and standard mode — see SuiteScript 2.x Standard and Dynamic Modes) Gets a numeric value for rate and ratehighprecision fields. The following code sample demonstrates
In this example, |
Returns |
number | Date | string | array | boolean Returns a JavaScript Date object for date/time field queries. To return a string for date/time field queries, use Record.getText(options). Date/time fields: DATE, DATETIME, DATETIMETZ, TIMEOFDAY.
Note:
If the returned date object is implicitly converted to a string, the value is converted using the browser’s setting for time zone. All fields of type CHECKBOX return All multiselect fields return an array of values. |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Sibling Object Members |
|
Since |
2015.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. |
2015.2 |
Errors
Error Code |
Thrown If |
---|---|
|
Invoked in standard mode, if you use setText or getText on a field and use getValue on the same field. |
|
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
...
var value = objRecord.getValue({
fieldId: 'item'
});
...
// Add additional code