TableRow Object Members for SuiteScript 2.1 Development
The TableRow object in SuiteScript 2.1 provides access to extracted table cells for document processing, crucial for data retrieval.
The TableRow object is essential for developers working with document processing in SuiteScript 2.1. This object allows access to the cells extracted from tables in processed documents, enabling effective handling of structured data.
Overview of TableRow Object Members
The TableRow object includes the following member:
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
TableRow.cells | documentCapture.Cell[] | Server scripts | The extracted cells in the table row. |
Property Description
TableRow.cells: This property returns an array ofdocumentCapture.Cellobjects, which represent the individual cells extracted from the corresponding table row. These cells contain data retrieved from documents like invoices and reports.
Errors
- Error Code:
READ_ONLY- Thrown If: You attempt to set the value of this property, as it is read-only.
Example Syntax
To illustrate how the TableRow may be utilized within your SuiteScript, consider the following snippet:
1// Sample SuiteScript code to extract table row data2const extractedData = documentCapture.documentToStructure({3 file: file.load("SuiteScripts/sample_invoice.pdf"),4 documentType: documentCapture.DocumentType.INVOICE,5 features: [documentCapture.Feature.TABLE_EXTRACTION]6});7 8const tableRowCells = extractedData.pages[0].tables[0].bodyRows[0].cells;9// Further processing on tableRowCells can be executed hereThis example demonstrates loading a document and extracting its structure, focusing on retrieving data from a specific table row.
Related Concepts
- For further understanding, refer to the N/documentCapture Module which encompasses related functionalities and methods for effective document processing.
Who This Affects
This information is relevant for:
- Developers: Those implementing solutions utilizing document extraction features.
- Administrators: Those overseeing script deployment and server-side scripting solutions.
By leveraging the TableRow object in your SuiteScript 2.1 workflows, you can efficiently work with structured documents and enhance your application's data processing capabilities.
Key Takeaways
- The TableRow object provides access to table cells in extracted documents.
- The property
TableRow.cellsreturns an array ofdocumentCapture.Cellobjects. - Attempting to modify the
cellsproperty will raise aREAD_ONLYerror. - This feature is primarily impactful for developers working on document processing scripts.
Frequently Asked Questions (4)
What script types support the TableRow object in SuiteScript 2.1?
Can I modify the cells in a TableRow object within my SuiteScript?
How does the TableRow object work with the documentCapture module?
Are there any prerequisites for using the TableRow object in SuiteScript 2.1?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
