codeunitFinanceofficial - Microsoftderived - from the source, no model text

Codeunit 11 "Gen. Jnl.-Check Line"

Base Application · Microsoft.Finance.GeneralLedger.Journal

Across versions

  1. BC23present
  2. BC246 procedures added, 3 events added
  3. BC251 procedures changed
  4. BC261 procedures added
  5. BC271 procedures added
  6. BC281 procedures added, 1 procedures removed
  7. BC291 procedures added
  8. BC30unchanged

Neighbourhood 38 connected objects and pages

Table 81 "Gen. Journal Line" (relates to)Gen. Journal LineCodeunit 5579 "Digital Voucher Impl." (event subscribers)Digital Voucher Impl.Codeunit 6908 "Expense Event Subscriber" (event subscribers)Expense Event SubscriberCodeunit 12 "Gen. Jnl.-Post Line" (calls, 8 links)Gen. Jnl.-Post LineCodeunit 408 "DimensionManagement" (calls, 6 links)DimensionManagementCodeunit 13 "Gen. Jnl.-Post Batch" (calls, 4 links)Gen. Jnl.-Post BatchCodeunit 28 "Error Message Management" (calls, 3 links)Error Message ManagementCodeunit 5980 "Service-Post" (calls, 3 links)Service-PostCodeunit 9081 "Check Gen. Jnl. Line. Backgr." (calls, 3 links)Codeunit 1720 "Deferral Utilities" (calls, 2 links)Deferral UtilitiesCodeunit 224 "EmplEntry-Apply Posted Entries" (calls, 2 links)Codeunit 226 "CustEntry-Apply Posted Entries" (calls, 2 links)CustEntry-Apply Posted EntriesCodeunit 227 "VendEntry-Apply Posted Entries" (calls, 2 links)VendEntry-Apply Posted EntriesCodeunit 4850 "AA Codes Posting Helper" (calls, 2 links)AA Codes Posting HelperCodeunit 5700 "User Setup Management" (calls, 2 links)Codeunit 1100 "Cost Account Mgt" (calls)Cost Account MgtCodeunit 1101 "CA Jnl.-Check Line" (calls)Codeunit 1303 "Correct Posted Sales Invoice" (calls)Correct Posted Sales InvoiceCodeunit 1313 "Correct Posted Purch. Invoice" (calls)Codeunit 1339 "Cancel Posted Sales Cr. Memo" (calls)Codeunit 1402 "Cancel Posted Purch. Cr. Memo" (calls)Codeunit 1511 "Notification Lifecycle Mgt." (calls)Codeunit 1690 "Bank Deposit-Post" (calls)Codeunit 250 "Gen. Jnl.-Post via Job Queue" (calls)Codeunit 360 "Accounting Period Mgt." (calls)Codeunit 442 "Sales-Post Prepayments" (calls)Codeunit 444 "Purchase-Post Prepayments" (calls)Codeunit 5631 "FA Jnl.-Check Line" (calls)Codeunit 5760 "Whse.-Post Receipt" (calls)Codeunit 5763 "Whse.-Post Shipment" (calls)Codeunit 5802 "Inventory Posting To G/L" (calls)Codeunit 799 "VAT Reporting Date Mgt" (calls)Codeunit 80 "Sales-Post" (calls)Codeunit 90 "Purch.-Post" (calls)Codeunit 900 "Assembly-Post" (calls)Report 212 "Sales Prepmt. Document Test" (calls)Report 412 "Purchase Prepmt. Doc. - Test" (calls)Table 179 "Reversal Entry" (calls)

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Base Application · Microsoft.Finance.GeneralLedger.Journal · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
TableNo Gen. Journal Line
Permissions tabledata “General Posting Setup” = rimd, tabledata “Cost Accounting Setup” = R, tabledata “G/L Account” = r, tabledata “Spend Request” = r, tabledata “Payment Terms” = R

Events published

  • OnAfterCheckAccountNo(var GenJournalLine: Record "Gen. Journal Line") (integration): Integration event raised after completing account number validation for journal lines. Enables custom validation logic and processing after standard account number checks are completed.
  • OnAfterCheckBalAccountNo(var GenJournalLine: Record "Gen. Journal Line") (integration): Integration event raised after completing balancing account number validation for journal lines. Enables custom validation logic and processing after standard balancing account number checks are completed.
  • OnAfterCheckGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var ErrorMessageMgt: Codeunit "Error Message Management") (integration): Integration event raised after completing all journal line validation checks. Enables custom validation logic and error handling after standard journal line validation is completed.
  • OnAfterDateNoAllowed(PostingDate: Date; var DateIsNotAllowed: Boolean) (integration): Integration event raised after checking if a posting date is not allowed based on user permissions and setup. Enables custom date validation logic and override of standard date restrictions.
  • OnAfterDeferralPostingDateNoAllowed(PostingDate: Date; var DateIsNotAllowed: Boolean) (integration): Integration event raised after checking if a deferral posting date is not allowed based on deferral setup and permissions. Enables custom deferral date validation logic and override of standard deferral date restrictions.
  • OnBeforeDateNotAllowed(GenJnlLine: Record "Gen. Journal Line"; var DateCheckDone: Boolean) (integration): Integration event raised before performing date validation checks for journal lines. Enables custom logic to completely override standard date validation processing.
  • OnBeforeIsDateNotAllowed(PostingDate: Date; SetupRecordID: RecordId; GenJnlBatch: Record "Gen. Journal Batch"; var DateIsNotAllowed: Boolean; var IsHandled: Boolean) (integration): Integration event raised before determining if a posting date is not allowed. Enables custom date validation logic to override standard date restriction checks.
  • OnBeforeIsDeferralPostingDateNotAllowed(PostingDate: Date; SetupRecordID: RecordId; GenJnlBatch: Record "Gen. Journal Batch"; var DateIsNotAllowed: Boolean; var IsHandled: Boolean) (integration): Integration event raised before determining if a deferral posting date is not allowed. Enables custom deferral date validation logic to override standard deferral date restriction checks.
  • OnBeforeCheckAccountNo(var GenJnlLine: Record "Gen. Journal Line"; var CheckDone: Boolean) (integration): Integration event raised before performing account number validation for journal lines. Enables custom logic to completely override standard account number validation processing.
  • OnBeforeCheckBalAccountNo(var GenJnlLine: Record "Gen. Journal Line"; var CheckDone: Boolean) (integration): Integration event raised before performing balancing account number validation for journal lines. Enables custom logic to completely override standard balancing account number validation processing.
  • OnBeforeCheckDimensions(var GenJnlLine: Record "Gen. Journal Line"; var CheckDone: Boolean) (integration): Integration event raised before performing dimension validation for journal lines. Enables custom logic to completely override standard dimension validation processing.
  • OnBeforeCheckDocType(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating document type and amount combinations for journal lines. Enables custom logic to completely override standard document type validation processing.
  • OnBeforeCheckBalDocType(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating balancing document type and amount combinations for journal lines. Enables custom logic to completely override standard balancing document type validation processing.
  • OnBeforeCheckICPartner(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DocumentType: Option; var CheckDone: Boolean; GenJnlLine: Record "Gen. Journal Line") (integration): Integration event raised before performing intercompany partner validation for journal lines. Enables custom logic to completely override standard IC partner validation processing.
  • OnBeforeCheckSalesDocNoIsNotUsed(DocType: Option; DocNo: Code[20]; var IsHandled: Boolean; GenJournalLine: Record "Gen. Journal Line"; var OldCustLedgerEntry: Record "Cust. Ledger Entry") (integration): Integration event raised before validating sales document number uniqueness in customer ledger entries. Enables custom logic to completely override standard sales document number duplication checking.
  • OnBeforeCheckPurchDocNoIsNotUsed(DocType: Option; DocNo: Code[20]; var IsHandled: Boolean; GenJournalLine: Record "Gen. Journal Line") (integration): Integration event raised before validating purchase document number uniqueness in vendor ledger entries. Enables custom logic to completely override standard purchase document number duplication checking.
  • OnBeforeErrorIfNegativeAmt(GenJnlLine: Record "Gen. Journal Line"; var RaiseError: Boolean) (integration): Integration event raised before validating that journal line amount is not negative. Enables custom logic to override negative amount error handling for specific scenarios.
  • OnBeforeErrorIfPositiveAmt(GenJnlLine: Record "Gen. Journal Line"; var RaiseError: Boolean) (integration): Integration event raised before validating that journal line amount is not positive. Enables custom logic to override positive amount error handling for specific scenarios.
  • OnBeforeRunCheck(var GenJournalLine: Record "Gen. Journal Line"; OverrideDimErr: Boolean; var IsHandled: Boolean) + BC24 − BC24 (integration): Integration event raised before performing the main journal line validation check. Enables custom logic to completely override standard journal line validation processing.
  • OnBeforeTestDocumentNo(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating document number field requirements for journal lines. Enables custom logic to completely override standard document number validation processing.
  • OnBeforeTestAccountAndBalAccountType(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) + BC24 (integration): Integration event raised before validating account and balancing account type compatibility for journal lines. Enables custom logic to completely override standard account type compatibility validation processing.
  • OnBeforeTestAppliesToID(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) + BC24 (integration): Integration event raised before validating applies-to ID field requirements for journal lines. Enables custom logic to completely override standard applies-to ID validation processing.
  • OnBeforeCheckPostingDateInFiscalYear(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating posting date against fiscal year boundaries for journal lines. Enables custom logic to completely override standard fiscal year date validation processing.
  • OnBeforeCheckDates(var GenJnlLine: Record "Gen. Journal Line") + BC28 (integration): Integration event raised at the beginning of the CheckDates procedure before any date validation is performed. Enables custom validation logic on journal line fields as part of the initial validation phase.
  • OnCheckDimensionsOnAfterAssignDimTableIDs(var GenJournalLine: Record "Gen. Journal Line"; var TableID: array[10] of Integer; var No: array[10] of Code[20]; var CheckDone: Boolean) (integration): Integration event raised after assigning dimension table IDs during dimension validation processing. Enables custom dimension table assignments and modification of dimension validation scope.
  • OnBeforeCheckAccountType(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating account type and posting type compatibility for journal lines. Enables custom logic to completely override standard account type validation processing.
  • OnBeforeCheckBalAccountType(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating balancing account type and posting type compatibility for journal lines. Enables custom logic to completely override standard balancing account type validation processing.
  • OnBeforeCheckAppliesToDocNo(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating applies-to document number requirements for journal lines. Enables custom logic to completely override standard applies-to document validation processing.
  • OnBeforeCheckJobNoIsEmpty(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating that job number field is empty for journal lines. Enables custom logic to completely override standard job number validation processing.
  • OnBeforeCheckZeroAmount(GenJnlLine: Record "Gen. Journal Line"; IsBatchMode: Boolean; var IsHandled: Boolean) (integration): Integration event raised before validating that journal line amount is not zero. Enables custom logic to completely override standard zero amount validation processing.
  • OnBeforeCheckElectronicPaymentFields(var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating electronic payment fields for journal lines. Enables custom logic to completely override standard electronic payment validation processing.
  • OnBeforeIsVendorPaymentToCrMemo(GenJnlLine: Record "Gen. Journal Line"; var Result: Boolean; var IsHandled: Boolean) (integration): Integration event raised before determining if a vendor payment applies to a credit memo. Enables custom logic to completely override standard vendor payment to credit memo logic.
  • OnBeforeCheckVATDate(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before validating VAT reporting date for journal lines. Enables custom logic to completely override standard VAT date validation processing.
  • OnCheckSalesDocNoIsNotUsedOnAfterSetFilters(GenJournalLine: Record "Gen. Journal Line"; var OldCustLedgerEntry: Record "Cust. Ledger Entry") (integration): Integration event raised after setting filters for sales document number duplication validation. Enables custom filter modifications during sales document number uniqueness checking.
  • OnCheckAccountNoOnBeforeCheckICPartner(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) (integration): Integration event raised before checking intercompany partner setup during account number validation. Enables custom logic to override IC partner checking for specific account scenarios.

Procedures

  • RunCheck(var GenJnlLine: Record "Gen. Journal Line"): Performs comprehensive validation checks on a general journal line before posting. Validates account numbers, amounts, dimensions, dates, and posting setup requirements.
  • GetErrors(var NewTempErrorMessage: Record "Error Message" temporary): Retrieves error messages collected during journal line validation checking. Returns all validation errors found during the RunCheck procedure execution.
  • DateNotAllowed(PostingDate: Date): Boolean: Checks if a posting date is not allowed based on general ledger setup restrictions. Validates against posting date restrictions in general ledger setup.
  • DeferralPostingDateNotAllowed(PostingDate: Date): Boolean: Checks if a posting date is not allowed for deferral transactions based on setup restrictions. Validates against deferral-specific posting date restrictions.
  • DateNotAllowed(PostingDate: Date; TemplateName: Code[20]): Boolean: Checks if a posting date is not allowed for the specified journal template based on setup restrictions. Validates posting date against template-specific and user-specific posting date limitations.
  • IsDateNotAllowed(PostingDate: Date; var SetupRecordID: RecordID): Boolean: Checks if a posting date is not allowed based on user setup and general ledger setup restrictions. Provides detailed setup record information for troubleshooting date restriction issues.
  • IsDeferralPostingDateNotAllowed(PostingDate: Date; var SetupRecordID: RecordID): Boolean: Checks if a posting date is not allowed for deferral transactions with detailed setup information. Validates against deferral-specific posting date restrictions and provides setup record details.
  • IsDateNotAllowed(PostingDate: Date; var SetupRecordID: RecordID; TemplateName: Code[20]): Boolean: Checks if a posting date is not allowed for the specified journal template with detailed setup information. Validates posting date against template-specific restrictions and provides setup record details for troubleshooting.
  • SetGenJnlBatch(NewGenJnlBatch: Record "Gen. Journal Batch"): Sets the general journal batch context for validation operations. Configures the batch context used during journal line validation checks.
  • SetSkipFiscalYearCheck(NewValue: Boolean): Sets whether to skip fiscal year validation during date checking. Controls fiscal year boundary validation during journal line validation.
  • ErrorIfPositiveAmt(GenJnlLine: Record "Gen. Journal Line"): Validates that journal line amount is not positive and raises error if it is. Used for transaction types that should only have negative amounts (e.g., payments).
  • ErrorIfNegativeAmt(GenJnlLine: Record "Gen. Journal Line"): Validates that journal line amount is not negative and raises error if it is. Used for transaction types that should only have positive amounts (e.g., receipts).
  • SetOverDimErr(): Sets flag to override dimension error handling during validation. Allows dimension validation errors to be bypassed during checking process.
  • SetIgnoreJournalTemplNameMandatoryCheck() + BC26: Sets flag to ignore journal template name mandatory validation. Bypasses the requirement for journal template name during validation checks.
  • CheckSalesDocNoIsNotUsed(var GenJournalLine: Record "Gen. Journal Line"): Validates that a sales document number is not already used in existing customer ledger entries. Prevents duplicate sales document numbers to maintain document integrity and audit trail.
  • CheckPurchDocNoIsNotUsed(var GenJournalLine: Record "Gen. Journal Line"): Validates that a purchase document number is not already used in existing vendor ledger entries. Prevents duplicate purchase document numbers to maintain document integrity and audit trail.
  • CheckDocType(GenJnlLine: Record "Gen. Journal Line"): Validates document type compatibility with account types and enforces amount sign requirements. Ensures document type and amount combinations comply with business logic for various account types.
  • IsVendorPaymentToCrMemo(GenJournalLine: Record "Gen. Journal Line"): Boolean: Determines if a journal line represents a vendor payment being applied to a credit memo. Used for payment logic and document type validation in payment journals.
  • ThrowGenJnlLineError(GenJournalLine: Record "Gen. Journal Line"; ErrorTemplate: Text; ErrorText: Text): Throws a formatted error for journal line validation failures with contextual information. Provides structured error handling with journal line context and detailed error messages.
  • SetBatchMode(NewBatchMode: Boolean): Sets batch processing mode to control validation behavior during bulk operations. Modifies validation logic to accommodate batch processing requirements.
  • CheckGenProdPostingGroupWhenAdjustForPmtDisc(GenJnlLine: Record "Gen. Journal Line"): Validates general product posting group is specified when VAT setup requires payment discount adjustment. Ensures proper posting group configuration for payment discount VAT calculations.
  • CheckBalGenProdPostingGroupWhenAdjustForPmtDisc(GenJnlLine: Record "Gen. Journal Line"): Validates balancing general product posting group is specified when VAT setup requires payment discount adjustment. Ensures proper balancing posting group configuration for payment discount VAT calculations.
  • SetLogErrorMode(NewLogErrorMode: Boolean): Sets error logging mode to control error handling behavior during validation. Enables or disables error collection mode for dimension management and validation processing.
  • CheckGLAccountSourceCurrency(var GLAccount: Record "G/L Account"; CurrencyCode: Code[10]) + BC24 Δ BC25 (internal)
  • HasVAT(var GenJnlLine: Record "Gen. Journal Line"): Boolean (internal)
  • CheckDeferralPostingAllowed(DeferralPostingAllowed: Boolean) + BC27

Plus 24 local procedures.

Triggers

OnRun

Relations

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Recent changes

Countries that replace it

CA, ES, IT, MX, NO, RU, US

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Gen. Jnl.-Check Line"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources