PostDocuments
Post accounting documents by ID, creating the corresponding transaction. Only documents with status "In Progress" can be posted; documents in any other status cannot be posted. Supported document types are cash entry (c2g__codaCashEntry__c), journal (c2g__codaJournal__c), sales invoice (c2g__codaInvoice__c), sales credit note (c2g__codaCreditNote__c), payable invoice (c2g__codaPurchaseInvoice__c) and payable credit note (c2g__codaPurchaseCreditNote__c). Because posting is synchronous, very large documents may exceed governor limits. Returns, per document, the transaction ID created on success or the error message if it could not be posted.
| Property | Value |
| Label | Post Documents |
| Category | Accounting |
| Since | Summer 2026 |
| Read-only | No |
| Supports Agents | Yes |
| Supports Flows | No |
| Async Action | No |
| Keywords | post, posting, transaction, invoice, journal, document |
Request Parameters
| Field | Type | Label | Description | Required |
documentId | ID | Document to Post | ID of the accounting document to post. Supported document types are cash entry (c2g__codaCashEntry__c), journal (c2g__codaJournal__c), sales invoice (c2g__codaInvoice__c), sales credit note (c2g__codaCreditNote__c), payable invoice (c2g__codaPurchaseInvoice__c) and payable credit note (c2g__codaPurchaseCreditNote__c). | Yes |
Response Parameters
| Field | Type | Label | Description | Required |
transactionId | ID | Transaction ID | ID of the transaction (c2g__codaTransaction__c) created when the document was posted successfully. Empty if the document was not posted. | No |
errorMessage | String | Error Message | Populated if the document could not be posted; contains the error detail. Empty on success. | No |
hasErrors | Boolean | Has Errors | 'True' if the document could not be posted; 'False' if it was posted successfully. | No |
|