Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

Record.getText(options)

{Record}.getText({fieldId: {string*}})

N/record Module
Record.getText()
Method Description: Returns the text representation of a field value. (dynamic and standard mode — see SuiteScript 2.0 – Standard and Dynamic Modes) Gets a string value with a "%" for rate and ratehighprecision fields.
Returns: string For multiselect fields, returns an array.
Supported Script Types: Client and server-side scripts. For more information, see SuiteScript 2.0 Script Types. In dynamic mode, you can use getText() without limitation but, in standard mode, limitations exist. In standard mode, you can use this method only in the following cases: You can use getText() on any field where the script has already used setText(). If you are loading or copying a record, you can use getText on any field except those where the script has already changed the value by using setValue(). For more details, refer to the description of the SSS_INVALID_API_USAGE error code in the Errors table.
Governance: None
Module: N/record Module
Sibling Object Members: Record Object Members
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Record.getText(options)

Example:

// Code Example 1
// Synax Sample 1
// Add additional code.
//...
var fieldidname = objRecord.getText({
fieldId: 'item'
});
//...
// Add additional code.

// Syntax Sample 2
// Add additional code.
//...
myString = 'Date is: ' + record.getText({fieldId: 'datechanged'});
// "Date is: 3/27/2017 9:55:38am"
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4273156769.html