Page Object Members for Document Capture in SuiteScript
Page Object Members enables powerful document classification and extraction features in SuiteScript for improved document processing.
The Page Object Members are part of the document capture functionality in SuiteScript. This feature facilitates the extraction of relevant information from documents, enhancing automation and processing accuracy.
What Are Page Object Members?
The Page Object Members in SuiteScript help developers extract vital data from uploaded documents, such as invoices or receipts. The main members include properties and methods that provide insights into the document content.
Key Properties and Methods
Here's a breakdown of the key properties and methods available in the Page Object:
| Member | Return Type | Description |
|---|---|---|
Page.detectedDocumentTypes | Object[] | Provides confidence levels indicating whether the page represents a specific document type. |
Page.fields | documentCapture.Field[] | Contains extracted fields from the document page. |
Page.lines | documentCapture.Line[] | Comprises extracted lines from the document page. |
Page.tables | documentCapture.Table[] | Includes extracted tables from the document page. |
Page.words | documentCapture.Word[] | Contains extracted individual words from the document page. |
Page.getText() | string | Returns the entire text of the page. |
Using Page Object Members
To utilize these members, ensure the relevant feature flags are enabled in your documentCapture.documentToStructure(options) call. This will allow you to extract desired fields based on your specific needs.
Example Syntax
The following code snippet demonstrates how to use the Page Object Members:
1const extractedData = documentCapture.documentToStructure({2 file: file.load("SuiteScripts/sample_invoice.pdf"),3 features: [4 documentCapture.Feature.FIELD_EXTRACTION,5 documentCapture.Feature.DOCUMENT_CLASSIFICATION6 ]7});8const pageDetectedDocumentTypes = extractedData.pages[0].detectedDocumentTypes;This simple setup lets you load a document and extract critical information, enhancing the overall productivity of your NetSuite instance.
Who This Affects
- Developers: They can leverage the Page Object Members to enhance document processing scripts.
- Administrators: Understanding these features helps in configuring document capture settings effectively.
Key Takeaways
- Page Object Members allow for efficient data extraction from documents.
- Key properties provide insights into document types, fields, lines, tables, and raw words.
- The
Page.getText()method offers a quick way to fetch all text content from a document page.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Do I need to enable a feature flag to use Page Object Members in SuiteScript?
How can developers extract specific document fields using SuiteScript's Page Object Members?
What data can be extracted using the Page Object Members in SuiteScript?
Are there any prerequisites for using document capture functionality with Page Object Members?
Was this article helpful?
More in Platform
- Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
- Asynchronous HTTP Requests with SuiteScript Promises
Use SuiteScript to send asynchronous HTTP requests with promises for efficient error handling and response processing.
- Setting Sublist Field Values in SuiteScript
Set values for sublist fields in SuiteScript using the setSublistValue method. Understand required parameters and error handling.
- In This Help Topic
Explore N/log module guidelines, log levels, and script execution logs for efficient logging in SuiteScript.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category