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 description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
MainAccountPoints to the main account. | Int64RefRecId | Yes | MainAccount.RecId | None |
LegalEntityPoints to the company (legal entity) that the settings apply to. | Int64RefRecId | Yes | CompanyInfo.RecId | None |
AutoAllocateYes/No flag for allocation on the account in this company. | EnumLedgerAutoAllocateNoYes (enum) | No | MainAccountLegalEntityOverrideEntity | |
CreatedByThe user who created the record. System field. | String (20)CreatedBy | No | None | |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | None | |
DefaultDimensionPoints to the default dimension value set for this account. | Int64LedgerDefaultDimensionValueSet | No | DimensionAttributeValueSet.RecId | MainAccountLegalEntityOverrideEntity |
DoNotAllowManualEntryYes/No flag that blocks manual entries on this account. | EnumNoYes (enum) | No | MainAccountLegalEntityOverrideEntity | |
ExchangeAdjustmentRateTypePoints to the exchange rate type used for exchange adjustments. | Int64ExchangeRateTypeRecId | No | ExchangeRateType.RecId | None |
FinDimValueSetID of the financial dimension value set.low confidence | Int64FinDimValueSetViewRecId | No | None | |
FixedDimensionsPoints to the dimension set that is fixed for this account. | Int64DimensionEnumeration | No | DimensionAttributeSet.RecId | MainAccountLegalEntityOverrideEntity |
ModifiedByThe user who last changed the record. System field. | String (20)ModifiedBy | No | None | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
ReportingExchangeAdjustmentRateTypePoints to the exchange rate type used for the reporting currency. | Int64ExchangeRateTypeRecId | No | ExchangeRateType.RecId | None |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TaxCodeSales tax code linked to the account. | StringTaxCode | No | MainAccountLegalEntityOverrideEntity | |
TaxDirectionWhether the sales tax applies to None, Sales or Purchase. | EnumSalesPurch (enum) | No | MainAccountLegalEntityOverrideEntity | |
TaxFreeYes/No flag showing whether the account is exempt from tax. | EnumNoYesIdNoYes (enum) | No | MainAccountLegalEntityOverrideEntity | |
TaxGroupSales tax group linked to the account. | StringTaxGroup | No | MainAccountLegalEntityOverrideEntity | |
TaxItemGroupItem sales tax group linked to the account. | StringTaxItemGroup | No | MainAccountLegalEntityOverrideEntity | |
TaxItemGroupHeadingDataAreaIdCompany code of the item sales tax group record.low confidence | StringDataAreaId | No | MainAccountLegalEntityOverrideEntity | |
TaxTableDataAreaIdCompany code of the sales tax record.low confidence | StringDataAreaId | No | MainAccountLegalEntityOverrideEntity | |
TotalByPeriod_FRYes/No flag for totals by period, used for France.low confidence | EnumNoYes (enum) | No | None | |
ValidateTaxCodeLevel of sales tax checking: optional, required, or limited to one or several valid options. | EnumFieldControl (enum) | No | MainAccountLegalEntityOverrideEntity |
Indexes (1)
MainAccountLegalEntityReplacement keyUnique, alternate key.
Relations (6)
Each relation joins MainAccountLegalEntity to another table on the fields shown.
CompanyInfo→CompanyInfoJoin on
LegalEntity = CompanyInfo.RecIdMany MainAccountLegalEntity records → exactly one CompanyInfo record
DimensionAttributeValueSet→DimensionAttributeValueSetJoin on
DefaultDimension = DimensionAttributeValueSet.RecIdMany MainAccountLegalEntity records → zero or one DimensionAttributeValueSet record
FixedDimensions→DimensionAttributeSetJoin on
FixedDimensions = DimensionAttributeSet.RecIdMany MainAccountLegalEntity records → zero or one DimensionAttributeSet record
MainAccount→MainAccountJoin on
MainAccount = MainAccount.RecIdMany MainAccountLegalEntity records → exactly one MainAccount record
ExchangeAdjustmentRateType→ExchangeRateTypeJoin on
ExchangeAdjustmentRateType = ExchangeRateType.RecIdMany MainAccountLegalEntity records → zero or one ExchangeRateType record
ReportingExchangeAdjustmentRateType→ExchangeRateTypeJoin on
ReportingExchangeAdjustmentRateType = ExchangeRateType.RecIdMany 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.
MainAccountLegalEntityOverrideEntity· 12 fields from this table
Need help with MainAccountLegalEntity in a report, an integration or a migration? Talk to Dr Dynamics.