workbook.FieldContext
Object Description |
A field context object which is used when you create a table column. Use workbook.createFieldContext(options) to create this object. |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Methods and Properties |
|
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. Also see Full scripts in the Tutorial: Creating a Workbook Using the Workbook API topic.
// 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