query.FieldContext

Note:

The content in this help topic pertains to SuiteScript 2.0.

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.

Enum Description

Holds the string values for the field context to use when creating a column using Query.createColumn(options) or Component.createColumn(options).

The field context determines how field values are displayed in a column. For example, you can specify that a column should display raw data (such as internal IDs), consolidated or converted amounts (such as currency totals), or user-friendly values (such as names).

Module

N/query Module

Sibling Module Members

N/query Module Members

Since

2019.1

Values

Value

Description

CONVERTED

Displays converted currency amounts using the exchange rate that was in effect on a specific date.

CURRENCY_CONSOLIDATED

Displays consolidated currency amounts in the base currency.

DISPLAY

Displays user-friendly field values. For example, for the entity field on Transaction records, using the DISPLAY enum value displays the name of the entity instead of its ID.

HIERARCHY

Displays user-friendly field values for hierarchical fields (for example, “Parent Company : SUB CAD”). This value is similar to the DISPLAY enum value but applies to hierarchical fields.

HIERARCHY_IDENTIFIER

Displays raw field values for hierarchical fields (for example, “1 : 5”). This value is similar to the RAW enum value but applies to hierarchical fields.

RAW

Displays raw field values. For example, for the entity field on Transaction records, using the RAW enum value displays the ID of the entity.

SIGN_CONSOLIDATED

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.

            // Add additional code
...
var myTransactionQuery = query.create({ type: query.Type.TRANSACTION
}); var myContextColumn = myTransactionQuery.createColumn({ fieldId: 'netamount', context: query.FieldContext.CURRENCY_CONSOLIDATED
});
...
// Add additional code 

          

Related Topics

N/query Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices