The following information provides Object API names, Required Fields, and information regarding posting and un-posting API calls.
The following fields are required on the Journal Entry Object: AcctSeed__Journal_Entry__c
|Field Name||API Name||Type|
|Journal Entry Name||Name||Text(80)|
The following fields are required on the Journal Entry Line Object: AcctSeed__Journal_Entry_Line__c
|Field Name||API Name||Type||Notes|
|Journal Entry||AcctSeed_Journal_Entry__c||Master Detail (Journal Entry)|
|Currency(16,2)||Either a debit or credit is required.|
|GL Account||AcctSeed__GLAccount__c||Lookup (GL Account)|
Posting A Journal Entry Utilizing The Salesforce API
There is a global class in the Accounting Cloud package called JournalEntryPostService. This class contains two static global methods. One is related to posting journal entry records called postJournalEntries and another is related to un-posting journal entry records called unpostJournalEntries.
You cannot call either method with more than 1,000 journal entry lines. If you need to post or un-post more than 1,000 journal entry lines you will need to call the class static method from a class which implements the Apex batchable interface.
Each method returns a list of post result records which will indicate if the journal entry was posted or un-posted successfully. If the record was not posted or un-posted successfully, an error code is provided, documenting the reason the record was not posted or un-posted.
The following error codes are supported for journal entry service:
- LINE_COUNT_LIMIT_EXCEEDED - attempted to post a set of journal entry records where the aggregate number of lines exceeded 1000.
- NO_LINES – the journal entry record does not have any associated journal entry lines and cannot be posted.
- CLOSED_ACCOUNTING_PERIOD - accounting period associated with the journal entry is closed.
- ALREADY_POSTED - record is already posted you are attempting to post
- STATUS_NOT_APPROVED - record attempting to post has a status not equal to approved
- ALREADY_UNPOSTED - record you are attempting to unpost is not posted
- CREDITS_DEBITS_NOT_EQUAL - total number of credits do not equal total number of debits for the journal entry