query.FieldContext
JavaScript does not include an enumeration type. The SuiteScript 2.x 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 |
|
Sibling Module Members |
|
Since |
2019.1 |
Values
Value |
Description |
---|---|
|
Displays converted currency amounts using the exchange rate that was in effect on a specific date. |
|
Displays consolidated currency amounts in the base currency. |
|
Displays user-friendly field values. For example, for the entity field on Transaction records, using the |
|
Displays user-friendly field values for hierarchical fields (for example, “Parent Company : SUB CAD”). This value is similar to the |
|
Displays raw field values for hierarchical fields (for example, “1 : 5”). This value is similar to the |
|
Displays raw field values. For example, for the entity field on Transaction records, using the |
|
— |
Syntax
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