documentCapture.getRemainingFreeUsage.promise() Syntax Guide
SuiteScript 2.1 syntax for calling documentCapture.getRemainingFreeUsage.promise() and handling its result with then().
This syntax reference shows how to call documentCapture.getRemainingFreeUsage.promise() and attach a then() callback. Oracle identifies the sample as syntax only, not a functional implementation. Complete N/documentCapture samples are available for PDF text extraction and synchronous or asynchronous document-content extraction in SuiteScript 2.1.
How do you call documentCapture.getRemainingFreeUsage.promise()?
Use the member with no arguments, then attach a callback through then(). The supplied syntax passes the resolved value to a callback parameter named result.
1// Add additional code2...3 4documentCapture.getRemainingFreeUsage.promise().then(function(result) {5 // Work with the result6});7 8...9// Add additional codeThe code before and after the call is represented by comments and ellipses. The callback body is also intentionally left as a placeholder: // Work with the result.
What does the provided sample establish?
The sample establishes the call shape for the promise member:
- Call
documentCapture.getRemainingFreeUsage.promise(). - Attach
then(function(result) { ... })to the returned promise. - Place code that works with
resultinside that callback.
It does not provide a complete script or show what should happen before the call, after the callback, or inside the callback. It also does not define the contents or format of result. Treat the snippet as member syntax rather than a copy-and-run implementation.
Where can you find complete N/documentCapture examples?
Oracle directs developers to N/documentCapture Module Script Samples for a complete script example. That sample collection pertains to SuiteScript 2.1 and includes examples for:
- Extracting text from a PDF file.
- Extracting feature content from a document synchronously.
- Extracting content from a document asynchronously.
Use those examples when you need a complete N/documentCapture script context rather than the isolated member syntax shown here.
Who This Affects
- SuiteScript 2.1 developers: Developers adding the promise-based member call to an N/documentCapture script.
- Developers reviewing sample code: Anyone who needs to distinguish the member’s syntax from a complete, functional script example.
Key Takeaways
documentCapture.getRemainingFreeUsage.promise()is shown with athen()callback.- The callback receives a parameter named
resultin the supplied syntax. - Oracle labels this code as syntax only, not a functional example.
- Complete N/documentCapture examples are available in the linked SuiteScript 2.1 sample collection.
- For separate syntax references, see llm.getRemainingUsage() Syntax in SuiteScript 2026.2, N/http Module Syntax for SuiteScript Redirects, and NetSuite Record Syntax for SuiteScript 2.x Operations.
Frequently Asked Questions (4)
How do you call documentCapture.getRemainingFreeUsage.promise() and handle its result?
Is the provided code a complete, runnable example I can copy and run?
Where can I find complete N/documentCapture script examples for SuiteScript 2.1?
Who is affected by this syntax reference?
Was this article helpful?
More in AI
- Prompt Studio: Generative AI Management in NetSuite 2026.1
Prompt Studio in NetSuite 2026.1 enhances generative AI management, enabling customization of prompts and Text Enhance actions.
- N/llm Module: Usage Limits and Additional Requests in NetSuite
In NetSuite 2026.1, the N/llm module sets usage limits and options for additional requests via Oracle Cloud.
- SuiteCloud Agent Skills for AI Development in NetSuite 2026.1
SuiteCloud Agent Skills enhance development workflows with AI-driven guidance in NetSuite 2026.1, improving automation and process standardization.
- Required Features and Permissions for NetSuite AI Connector
Ensure Server SuiteScript and OAuth 2.0 are enabled for secure usage of the NetSuite AI Connector Service.
Advertising
Reach AI Professionals
Put your product in front of NetSuite experts who work with AI every day.
Sponsor This Category