Post-Processing E-Document Certification in NetSuite 2026.1
Starting in NetSuite 2026.1, the PostProcess function enhances e-document certification handling for LATAM.
TL;DR Opening
Starting in NetSuite 2026.1, the PostProcess function streamlines e-document certification requests for Brazilian tax compliance. This enhancement automates the processing, storage, and retrieval of certified e-documents, making it easier for administrators and developers to manage tax documentation.
What's New
The PostProcess function in the LATAM E-Document Certification SuiteApp is designed to complete the processing of e-document certification requests. It can extract and save key information from the certified e-document, enabling seamless integration with your File Cabinet for efficient record management. This function is especially crucial for companies operating in Brazil and ensures compliance with local tax regulations.
Function Declaration
The core functionality is encapsulated in the following function:
function postProcess(context)
Type
This is classified as an interface function within the SuiteApp.
Description
The postProcess function handles two primary operations based on the request type: sending an e-document for certification and canceling a previously certified e-document. Each operation processes the input context and interacts with the designated tax authority according to predefined rules.
Returns
The function returns an object of type PostProcessResult, which contains the following:
- success: Indicates if the operation was successful.
- message: Describes the result of the operation.
- returnDetails: An object holding various certification details from the tax authority.
Input Parameters
The function accepts a postProcessContext object with key properties:
- subsidiary (String, Number): The ID of the subsidiary initiating the request.
- taxAuthority (String, Number): The ID of the tax authority certification service.
- category (String, Number): The ID related to the e-document category.
- operationTypeExternalId (String, Number): The external ID for the operation type.
Example Implementation
Here is a concise example showing how to implement the postProcess function:
function postProcess(context) {
var success = false;
var message = "";
var fileId = null;
// Additional variable declarations...
var folderId = taxAuthLib.getEDocumentFolderId(context.taxAuthority, context.subsidiary, context.category);
var operationTypeExternalId = context.operationTypeExternalId;
switch(operationTypeExternalId) {
case 'Send E-Document': {
var saveResult = taxAuthLib.saveFile({
content: context.responseResult.contents,
fileName: "Certified E-Document - " + context.requestParameters.transaction,
folderId: folderId,
tagSoap: this.XML_TAG_SOAP_CHECKING
});
// Handle save result...
break;
}
case 'Cancel': {
var saveResult = taxAuthLib.saveFile({
content: context.responseResult.contents,
fileName: "Cancelled E-Document - " + context.requestParameters.transaction,
folderId: folderId,
tagSoap: this.XML_TAG_SOAP_CANCELING
});
// Handle save result...
break;
}
}
return {
success: success,
message: message,
returnDetails: {
// Return details...
}
};
};
Who This Affects
- Administrators: They will need to configure e-document settings according to local regulations.
- Developers: They can utilize the
postProcessfunction in their e-document handling scripts. - Accountants: They must ensure compliance with tax authority requirements through e-document certifications.
Key Takeaways
- The
postProcessfunction automates the handling of e-document certifications, reducing manual intervention. - It supports both sending and canceling e-documents, critical for tax compliance in Brazil.
- Ensure the proper configuration of the function’s input parameters to align with your tax authority requirements.
Frequently Asked Questions (4)
Does the PostProcess function apply to all NetSuite editions?
What permissions are required to use the PostProcess function?
How does the PostProcess function interact with the File Cabinet?
What happens if an order is partially fulfilled when using the PostProcess function?
Weekly Update History (1)
Updated the postProcess(context) topic under Tax Authority Plug-in Interface Definition to add information about the extraction of content from the tax authority's response.
View Oracle DocsWas this article helpful?