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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category