workbook.FieldContext

Note:

The content in this help topic applies to SuiteScript 2.x.

Object Description

A field context. A field context is used when you create a table column.

You can create a field context using workbook.createFieldContext(options).

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/workbook Module

Methods and Properties

FieldContext Object Members

Since

2020.2

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/workbook Module Script Samples.

            // Add additional code
...
// Create a basic FieldContext
var myFieldContext = workbook.createFieldContext({
    name: 'My Field Context'
});

// Create a complete FieldContext
var myFieldContext = workbook.createFieldContext({
    name: 'My Field Context',
    parameters: {
        parm1: 'ABC'
    }
});
// View a workbook.FieldContext used in a TableDefinition
var myWorkbook = workbook.load ({
    id: myWorkbookId
});

// Note that some FieldContext properties may be empty/null based on the loaded workbook
var myFieldContext = myWorkbook.tableDefinitions[0].columns[0].fieldContext;

log.audit({
    title: 'FieldContext.name = ',
    details: myFieldContext.name
});
log.audit({
    title: 'FieldContext.parameters = ',
    details: myFieldContext.parameters
});
...
// Add additional code 

          

Related Topics

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

General Notices