Table
LedgerAccountRestrictionV2_CN
Restriction type for voucher V2
Second version of the voucher account restrictions, used for China. It can restrict a single account, a group or all accounts of an account type for a voucher type.
- Table name
LedgerAccountRestrictionV2_CN- Module
General ledger- Table group
Reference- Table type
Regular- Data per company
Yes- Configuration key
LedgerBasic- Primary index
RecId- Replacement key
AccountRestrictionIdx- Key fields
LedgerVoucherType, AccountType, AccountCode, AccountRelation, RestrictionType, LedgerDimension- Model
Foundation
Fields (12)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
LedgerVoucherTypeLink to the voucher type that the restriction belongs to. | Int64LedgerVoucherTypeRefRecId_CN | Yes | LedgerVoucherType_CN.RecId | None |
AccountTypeType of account that the restriction applies to, such as ledger, customer or vendor. | EnumLedgerJournalACType (enum) | No | LedgerVoucherTypeAccountRestrictionV2Entity | |
AccountCodeSays whether the restriction applies to one account, a group or all accounts. | EnumTableGroupAll (enum) | No | LedgerVoucherTypeAccountRestrictionV2Entity | |
AccountRelationGroup number used when the restriction applies to a group. It points to the group table of the account type. | String (20)CustVendRel | No | AssetGroup.GroupIdBankGroup.BankGroupIdCustGroup.CustGroupProjGroup.ProjGroupIdVendGroup.VendGroup | LedgerVoucherTypeAccountRestrictionV2Entity |
RestrictionTypeRule that says which accounts a voucher must or must not include, for debits, credits or both. | EnumLedgerVoucherRestrictionType_CN (enum) | No | LedgerVoucherTypeAccountRestrictionV2Entity | |
LedgerDimensionLink to the account combination that the restriction uses. | Int64DimensionDynamicDefaultAccount | No | DimensionAttributeValueCombination.RecId | LedgerVoucherTypeAccountRestrictionV2Entity |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | 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 | |
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 |
Indexes (2)
DimensionAttributeValueCombinationIdxNot unique.
AccountRestrictionIdxReplacement keyLedgerVoucherType,AccountType,AccountCode,AccountRelation,RestrictionType,LedgerDimensionUnique, alternate key.
Relations (7)
Each relation joins LedgerAccountRestrictionV2_CN to another table on the fields shown.
DimensionAttributeValueCombination→DimensionAttributeValueCombinationJoin on
LedgerDimension = DimensionAttributeValueCombination.RecIdMany LedgerAccountRestrictionV2_CN records → exactly one DimensionAttributeValueCombination record
LedgerVoucherType→LedgerVoucherType_CNJoin on
LedgerVoucherType = LedgerVoucherType_CN.RecIdMany LedgerAccountRestrictionV2_CN records → exactly one LedgerVoucherType_CN record
CustGroup→CustGroupJoin on
AccountType = LedgerJournalACType::Cust,AccountCode = TableGroupAll::GroupId,AccountRelation = CustGroup.CustGroupMany LedgerAccountRestrictionV2_CN records → zero or one CustGroup record
VendGroup→VendGroupJoin on
AccountType = LedgerJournalACType::Vend,AccountCode = TableGroupAll::GroupId,AccountRelation = VendGroup.VendGroupMany LedgerAccountRestrictionV2_CN records → zero or one VendGroup record
ProjGroup→ProjGroupJoin on
AccountType = LedgerJournalACType::Project,AccountCode = TableGroupAll::GroupId,AccountRelation = ProjGroup.ProjGroupIdMany LedgerAccountRestrictionV2_CN records → zero or one ProjGroup record
AssetGroup→AssetGroupJoin on
AccountType = LedgerJournalACType::FixedAssets,AccountCode = TableGroupAll::GroupId,AccountRelation = AssetGroup.GroupIdMany LedgerAccountRestrictionV2_CN records → zero or one AssetGroup record
BankGroup→BankGroupJoin on
AccountType = LedgerJournalACType::Bank,AccountCode = TableGroupAll::GroupId,AccountRelation = BankGroup.BankGroupIdMany LedgerAccountRestrictionV2_CN records → zero or one BankGroup record
Get this data out
Tables are not exposed directly. These public entities read from LedgerAccountRestrictionV2_CN; use one of them in Power BI, Power Platform or a data management project.
LedgerVoucherTypeAccountRestrictionV2Entity· 5 fields from this table
Need help with LedgerAccountRestrictionV2_CN in a report, an integration or a migration? Talk to Dr Dynamics.