Table
TrvCostType
Expense category
Holds expense categories, identified by the category code. It stores a description, expense type, main account, default payment method, sales tax groups and statistics group. It also holds flags such as inactive, import only and itemization mandatory.
- Table name
TrvCostType- Module
Expense- Table group
Reference- Table type
Regular- Data per company
Yes- Configuration key
Trv- Primary index
CostType- Replacement key
None- Key fields
CostType- Model
Foundation
Fields (21)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
CostTypeCode of the expense category. Points to the category table. | String (30)TrvCostTypeEDT | Yes | CategoryTable.CategoryId | TrvExpenseCategoryEntityProjExpenseCategoryExportEntity |
AccountTypeType of account used for the category, such as ledger or vendor. | EnumLedgerJournalACType (enum) | No | TrvExpenseCategoryEntity | |
CostTxtDescription of the expense category. | String (60)TrvCostTxt | No | TrvExpenseCategoryEntityProjExpenseCategoryExportEntity | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
ExpenseEntryAgentDefaultTaxSubCategoryDefault tax subcategory for the category. Points to an expense subcategory. | Int64TrvExpSubCategoryEDT | No | TrvExpSubCategory.RecId | TrvExpenseCategoryEntity |
ExpTypeKind of expense, such as per diem, mileage, airline or car rental. | EnumTrvExpTypeEDTTrvExpType (enum) | Yes | TrvExpenseCategoryEntityProjExpenseCategoryExportEntity | |
IsCommonYes/No marker for a commonly used category. | EnumNoYes (enum) | No | TrvExpenseCategoryEntity | |
IsGovernmentYes/No marker to include the category in anti-corruption checks. | EnumNoYes (enum) | No | None | |
isImportOnlyYes/No marker for a category that is used only for imports. | EnumNoYes (enum) | No | TrvExpenseCategoryEntity | |
IsInactiveYes/No marker for an inactive category. | EnumNoYesIdNoYes (enum) | No | TrvExpenseCategoryEntityProjExpenseCategoryExportEntity | |
IsItemizationMandatoryYes/No marker showing that itemization is required for the category. | EnumNoYesIdNoYes (enum) | No | TrvExpenseCategoryEntity | |
LedgerDimensionMain account for the category. Points to a dimension combination. | Int64LedgerDimensionDefaultAccount | No | DimensionAttributeValueCombination.RecId | TrvExpenseCategoryEntity |
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 | |
StdPaiMethodDefault payment method. Points to the payment methods. | StringTrvStdPaiMethod | Yes | TrvPayMethod.PayMethod | TrvExpenseCategoryEntity |
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 | |
TaxItemGroupItem sales tax group. Points to the item sales tax groups. | StringTaxItemGroup | No | TaxItemGroupHeading.TaxItemGroup | TrvExpenseCategoryEntity |
TaxItemGroupIfBilledToEmployeeAlternate item sales tax group. Points to the item sales tax groups. | StringTaxItemGroup | No | TaxItemGroupHeading.TaxItemGroup | TrvExpenseCategoryEntity |
TrvCostTypeStatisticsIdStatistics group of the category. Points to the statistics groups. | String (32)TrvCostTypeStatisticsId | No | TrvCostTypeStatistics.TrvCostTypeStatisticsId | TrvExpenseCategoryEntity |
Indexes (2)
CostTypePrimary indexUnique, alternate key.
LedgerDimensionIdxNot unique.
Relations (7)
Each relation joins TrvCostType to another table on the fields shown.
CategoryTable→CategoryTableJoin on
CostType = CategoryTable.CategoryIdZero or one TrvCostType record → exactly one CategoryTable record
LedgerDimension→DimensionAttributeValueCombinationJoin on
LedgerDimension = DimensionAttributeValueCombination.RecIdMany TrvCostType records → zero or one DimensionAttributeValueCombination record
PayMethod→TrvPayMethodJoin on
StdPaiMethod = TrvPayMethod.PayMethodMany TrvCostType records → exactly one TrvPayMethod record
TaxItemGroupHeading→TaxItemGroupHeadingJoin on
TaxItemGroup = TaxItemGroupHeading.TaxItemGroupMany TrvCostType records → zero or one TaxItemGroupHeading record
TaxItemGroupHeadingBilledToEmployee→TaxItemGroupHeadingJoin on
TaxItemGroupIfBilledToEmployee = TaxItemGroupHeading.TaxItemGroupMany TrvCostType records → zero or one TaxItemGroupHeading record
TrvCostTypeStatistics→TrvCostTypeStatisticsJoin on
TrvCostTypeStatisticsId = TrvCostTypeStatistics.TrvCostTypeStatisticsIdMany TrvCostType records → zero or one TrvCostTypeStatistics record
DefaultTaxSubCategory→TrvExpSubCategoryJoin on
ExpenseEntryAgentDefaultTaxSubCategory = TrvExpSubCategory.RecId,TrvExpSubCategory.IsInactive = NoYes::NoMany TrvCostType records → zero or one TrvExpSubCategory record
Get this data out
Tables are not exposed directly. These public entities read from TrvCostType; use one of them in Power BI, Power Platform or a data management project.
TrvExpenseCategoryEntity· 14 fields from this tableProjExpenseCategoryExportEntity· 4 fields from this table
Need help with TrvCostType in a report, an integration or a migration? Talk to Dr Dynamics.