Workbook Table Object Members Reference for SuiteScript
The workbook.Table object provides essential members for manipulating table views in SuiteScript, including columns and datasets.
The workbook.Table object is essential for developers working with table views in SuiteScript. It provides key members that help to define and manipulate the structure of tables within your applications. Understanding how to utilize these members effectively can enhance the way data is represented in your NetSuite environment.
What Are the Members of the Table Object?
The workbook.Table object includes several members that allow you to access and modify properties of the table view. Here's a detailed breakdown:
| Member Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|
Table.columns | workbook.TableColumn[] | Server scripts | The columns in the table view. |
Table.dataset | dataset.Dataset | Server scripts | The dataset for the table view. |
Table.id | string | Server scripts | The ID of the table view. |
Table.name | `string | workbook.Expression` | Server scripts |
How to Create a Table Object
To create a workbook.Table object, use the workbook.createTable(options) method. Here is a basic example of how to instantiate a table object:
Code Sample
1// Code to create a workbook.Table object2var myTable = nWorkbook.createTable({3 columns: [column1, column2], // Previously defined workbook.TableColumn objects4 dataset: myDataset, // Previously defined dataset5 id: 'myTableId', // Unique identifier for the table6 name: 'myTableName' // Label for the table7});This snippet demonstrates how to declare and initialize a workbook.Table object, which can then be used in various operations throughout your script.
Logging Table Columns
If you need to log or inspect the columns of a table, you can do so with the following syntax:
Code Sample
1// Load the workbook and log the first column of the first table2var myWorkbook = workbook.load({3 id: myWorkbookId 4});5 6log.audit({7 title: 'Table.columns = ',8 details: myWorkbook.tables[0].columns[0] // Accessing the first column9});This approach is useful for debugging and understanding the structure of your table data.
Conclusion
The workbook.Table object and its members are powerful tools in SuiteScript, enabling developers to craft dynamic and effective data views in NetSuite. Mastering these attributes will improve your ability to control how data is presented to users.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- The
workbook.Tableobject provides key features for managing table views. - Members like
columns,dataset,id, andnameare essential for defining tables. - Understanding syntax and usage can enhance data representation in your scripts.
Frequently Asked Questions (4)
How can I create a workbook.Table object in SuiteScript?
What are the necessary attributes to define when creating a workbook.Table object?
Can I use workbook.Table in client scripts?
How do I access the columns in a workbook.Table object for logging or inspection?
Was this article helpful?
More in Integration
- Natural Language Queries in NetSuite AI
MCP Standard Tools SuiteApp enables AI-driven data tasks in NetSuite, aligned with role permissions.
- Square Connector Integration in NetSuite 2026.1
Discover the Square Connector for seamless integration with NetSuite 2026.1, synchronizing transactions, orders, and inventory effortlessly.
- SuiteTalk Web Services Updates for NetSuite Integrations
SuiteTalk Web Services adds new Item Supply Plan support, enhancing integrations for efficient data management.
- SuiteTalk Web Services Enhancements in NetSuite
Explore the latest enhancements to SuiteTalk Web Services, improving integration and API functionalities in NetSuite.
Advertising
Reach Integration Professionals
Put your product in front of NetSuite experts who work with Integration every day.
Sponsor This Category