Table

MainAccountLegalEntity

Main account legal entity

Holds the settings of a main account for one company (legal entity). The key is the main account plus the legal entity. It covers default dimensions, exchange rate types, manual entry control and sales tax settings.

Table name
MainAccountLegalEntity
Module
Financial dimensions
Table group
Main
Table type
Regular
Data per company
No
Configuration key
LedgerBasic
Primary index
None
Replacement key
MainAccountLegalEntity
Key fields
MainAccount, LegalEntity
Model
Ledger

Fields (27)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
MainAccountPoints to the main account.Int64
RefRecId
YesMainAccount.RecIdNone
LegalEntityPoints to the company (legal entity) that the settings apply to.Int64
RefRecId
YesCompanyInfo.RecIdNone
AutoAllocateYes/No flag for allocation on the account in this company.Enum
LedgerAutoAllocate
NoYes (enum)
NoMainAccountLegalEntityOverrideEntity
CreatedByThe user who created the record. System field.String (20)
CreatedBy
NoNone
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
DefaultDimensionPoints to the default dimension value set for this account.Int64
LedgerDefaultDimensionValueSet
NoDimensionAttributeValueSet.RecIdMainAccountLegalEntityOverrideEntity
DoNotAllowManualEntryYes/No flag that blocks manual entries on this account.Enum
NoYes (enum)
NoMainAccountLegalEntityOverrideEntity
ExchangeAdjustmentRateTypePoints to the exchange rate type used for exchange adjustments.Int64
ExchangeRateTypeRecId
NoExchangeRateType.RecIdNone
FinDimValueSetID of the financial dimension value set.low confidenceInt64
FinDimValueSetViewRecId
NoNone
FixedDimensionsPoints to the dimension set that is fixed for this account.Int64
DimensionEnumeration
NoDimensionAttributeSet.RecIdMainAccountLegalEntityOverrideEntity
ModifiedByThe user who last changed the record. System field.String (20)
ModifiedBy
NoNone
ModifiedDateTimeThe date and time when the record was last changed. System field.UtcDateTime
ModifiedDateTime
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
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
ReportingExchangeAdjustmentRateTypePoints to the exchange rate type used for the reporting currency.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
TaxCodeSales tax code linked to the account.String
TaxCode
NoMainAccountLegalEntityOverrideEntity
TaxDirectionWhether the sales tax applies to None, Sales or Purchase.Enum
SalesPurch (enum)
NoMainAccountLegalEntityOverrideEntity
TaxFreeYes/No flag showing whether the account is exempt from tax.Enum
NoYesId
NoYes (enum)
NoMainAccountLegalEntityOverrideEntity
TaxGroupSales tax group linked to the account.String
TaxGroup
NoMainAccountLegalEntityOverrideEntity
TaxItemGroupItem sales tax group linked to the account.String
TaxItemGroup
NoMainAccountLegalEntityOverrideEntity
TaxItemGroupHeadingDataAreaIdCompany code of the item sales tax group record.low confidenceString
DataAreaId
NoMainAccountLegalEntityOverrideEntity
TaxTableDataAreaIdCompany code of the sales tax record.low confidenceString
DataAreaId
NoMainAccountLegalEntityOverrideEntity
TotalByPeriod_FRYes/No flag for totals by period, used for France.low confidenceEnum
NoYes (enum)
NoNone
ValidateTaxCodeLevel of sales tax checking: optional, required, or limited to one or several valid options.Enum
FieldControl (enum)
NoMainAccountLegalEntityOverrideEntity

Indexes (1)

Relations (6)

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

  • CompanyInfo → CompanyInfo

    Join on LegalEntity = CompanyInfo.RecId

    Many MainAccountLegalEntity records → exactly one CompanyInfo record

  • DimensionAttributeValueSet → DimensionAttributeValueSet

    Join on DefaultDimension = DimensionAttributeValueSet.RecId

    Many MainAccountLegalEntity records → zero or one DimensionAttributeValueSet record

  • FixedDimensions → DimensionAttributeSet

    Join on FixedDimensions = DimensionAttributeSet.RecId

    Many MainAccountLegalEntity records → zero or one DimensionAttributeSet record

  • MainAccount → MainAccount

    Join on MainAccount = MainAccount.RecId

    Many MainAccountLegalEntity records → exactly one MainAccount record

  • ExchangeAdjustmentRateType → ExchangeRateType

    Join on ExchangeAdjustmentRateType = ExchangeRateType.RecId

    Many MainAccountLegalEntity records → zero or one ExchangeRateType record

  • ReportingExchangeAdjustmentRateType → ExchangeRateType

    Join on ReportingExchangeAdjustmentRateType = ExchangeRateType.RecId

    Many MainAccountLegalEntity records → zero or one ExchangeRateType record

Get this data out

Tables are not exposed directly. These public entities read from MainAccountLegalEntity; use one of them in Power BI, Power Platform or a data management project.

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

Email sales@drdynamics.co.uk