Table

MainAccountTemplate

Main account templates

Holds templates for main accounts, identified by the template name. A template stores account number, name, type, posting type, currency and exchange rate settings. It also stores validation rules for currency, posting and user.

Table name
MainAccountTemplate
Module
Financial dimensions
Table group
Main
Table type
Regular
Data per company
No
Configuration key
LedgerBasic
Primary index
None
Replacement key
MainAccountTemplateIdx
Key fields
Name
Model
Ledger

Fields (32)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
NameName of the main account template. It is the key of the table.String (20)
MainAccountTemplateNum
YesNone
AccountDescriptionName of the main account in the template.String (60)
AccountName
NoNone
AccountNumberMain account number set in the template.String (20)
AccountNum
NoNone
ClosingClosing type of the account: none, result, balance or capital.Enum
LedgerClosing (enum)
NoNone
ConsolidationMainAccountMain account number used for consolidation.String (20)
LedgerConsolidateMainAccount
NoNone
ControlUserSystem record ID of a reference. The related table is not given in the metadata.low confidenceInt64
RefRecId
NoNone
CurrencyCodeCurrency set in the template, pointing to the currency table.String (3)
CurrencyCode
NoCurrency.CurrencyCodeNone
DebitCreditBalanceDemandBalance control setting: none, debit or credit.Enum
DebCredBalanceDemand
DebCredProposal (enum)
NoNone
DebitCreditCheckDebit or credit requirement for the account: none, debit or credit.Enum
DebCredProposal (enum)
NoNone
DebitCreditProposalDebit or credit proposal for the account: none, debit or credit.Enum
DebCredProposal (enum)
NoNone
DescriptionDescription of the template account.String (60)
Description
NoNone
ExchangeAdjustedYes/No setting for foreign currency revaluation of the account.Enum
NoYesId
NoYes (enum)
NoNone
ExchangeAdjustmentRateTypeExchange rate type used for revaluation, pointing to the exchange rate type table.Int64
ExchangeRateTypeRecId
NoExchangeRateType.RecIdNone
FinancialReportingExchangeRateTypeExchange rate type used for financial reporting, pointing to the exchange rate type table.Int64
ExchangeRateTypeRecId
NoExchangeRateType.RecIdNone
FinancialReportingTranslationTypeCurrency translation type for reporting: weighted average, average, current or transaction date.Enum
FinancialReportingTranslationType (enum)
NoNone
IsBlockedForManualEntryYes/No setting that blocks manual entry on the account.Enum
NoYes (enum)
NoNone
MainAccountCategoryMain account category, pointing to the main account categories table.Int64
RefRecId
NoMainAccountCategory.RecIdNone
MandatoryPaymentReferenceYes/No setting that makes a reference mandatory.Enum
NoYesId
NoYes (enum)
NoNone
MonetaryYes/No flag showing whether the account is monetary.Enum
LedgerMonetary
NoYes (enum)
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PostingTypePosting type of the account, such as exchange rate gain or sales tax.Enum
LedgerPostingType (enum)
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
ReportingAccountTypeReporting type of the account: none, header, empty header or page header.Enum
DimensionLedgerAccountReportingType (enum)
NoNone
ReportingExchangeAdjustmentRateTypeExchange rate type for the reporting currency, pointing to the exchange rate type table.Int64
ExchangeRateTypeRecId
NoExchangeRateType.RecIdNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TypeMain account type, such as profit and loss, revenue, expense or balance sheet.Enum
DimensionLedgerAccountType (enum)
NoNone
UserInfoIdUser ID, related to the user information table.String
UserId
NoNone
ValidateCurrencyRule for the currency: optional, required, or one or several valid options.Enum
FieldControl (enum)
NoNone
ValidatePostingRule for the posting type: optional, required, or one or several valid options.Enum
FieldControl (enum)
NoNone
ValidateUserRule for the user: optional, required, or one or several valid options.Enum
FieldControl (enum)
NoNone

Indexes (1)

  • MainAccountTemplateIdxReplacement key

    Name

    Unique, alternate key.

Relations (6)

Each relation joins MainAccountTemplate to another table on the fields shown.

  • Currency → Currency

    Join on CurrencyCode = Currency.CurrencyCode

    Many MainAccountTemplate records → zero or one Currency record

  • FinancialReportingExchangeRateType → ExchangeRateType

    Join on FinancialReportingExchangeRateType = ExchangeRateType.RecId

    Many MainAccountTemplate records → zero or one ExchangeRateType record

  • MainAccountCategory → MainAccountCategory

    Join on MainAccountCategory = MainAccountCategory.RecId

    Many MainAccountTemplate records → zero or one MainAccountCategory record

  • UserInfo → UserInfo

    Join on UserInfoId = UserInfo.id

    Many MainAccountTemplate records → zero or one UserInfo record

  • ExchangeAdjustmentRateType → ExchangeRateType

    Join on ExchangeAdjustmentRateType = ExchangeRateType.RecId

    Many MainAccountTemplate records → zero or one ExchangeRateType record

  • ReportingExchangeAdjustmentRateType → ExchangeRateType

    Join on ReportingExchangeAdjustmentRateType = ExchangeRateType.RecId

    Many MainAccountTemplate records → zero or one ExchangeRateType record

Get this data out

No public entity reads from MainAccountTemplate. Its data is only reachable through the application, a custom entity or a database export.

Need help with MainAccountTemplate in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk