Codeunit 6973 "Create Expense Categories"
ExpenseAgent · Microsoft.ExpenseAgent
Across versions
- BC23-28not present
- BC29present
- BC30changed
Neighbourhood 10 connected objects and pages
ExpenseAgent · Microsoft.ExpenseAgent · BC29-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
Events published
OnAfterBuildPostingGroupSeeds(var TempPostingGroup: Record "Expense Posting Group" temporary)(integration)OnAfterBuildCategorySeeds(var TempCategory: Record "Expense Category" temporary)(integration)OnAfterBuildSubcategorySeeds(var TempSubcategory: Record "Expense Subcategory" temporary)(integration)OnAfterBuildRuleSeeds(var TempRuleHeader: Record "Expense Rule Header" temporary)(integration)OnAfterBuildRuleConditionSeeds(var TempRuleCondition: Record "Expense Rule Condition" temporary)(integration)OnBeforeInsertPostingGroupSeed(var TempPostingGroup: Record "Expense Posting Group" temporary)(integration)OnBeforeAddPostingGroupSeed(Code: Code[20]; Description: Text[100]; RefundableDebitAccount: Code[20]; var IsHandled: Boolean)(integration)OnBeforeUpdateEmployeePostingGroup(Code: Code[20]; ExpenseReportPayableAccount: Code[20]; ExpensePayableBankPaidAccount: Code[20]; ExpensePayableCardPaidAccount: Code[20]; ExpenseReportPrepaymentAccount: Code[20]; var IsHandled: Boolean)(integration)OnBeforeInsertRuleSeed(var TempRuleHeader: Record "Expense Rule Header" temporary)(integration)OnBeforeAddCategorySeed(Code: Code[20]; Description: Text[250]; PostingDescription: Text[100]; ExpenseGroupCode: Code[20]; PostingGroupCode: Code[20]; PaymentMethod: Code[10]; IsRefundable: Boolean; IsPrepayment: Boolean; AttachmentEnforcement: Enum "Expense Attachment Enforcement"; DetailRequired: Enum "Expense Detail Needed"; var IsHandled: Boolean)(integration)OnBeforeAddSubcategorySeed(SubcategoryCode: Code[20]; CategoryCode: Code[20]; Description: Text[250]; PostingDescription: Text[100]; Refundable: Boolean; DescriptionMandatory: Boolean; var IsHandled: Boolean)(integration)OnBeforeAddRuleSeed(var TempRuleHeader: Record "Expense Rule Header"; var CategoryCode: Code[20]; var ExpenseLocationCode: Code[20]; var CurrencyCode: Code[10]; var JustificationRequired: Enum "Expense Justification"; var IsHandled: Boolean)(integration)OnBeforeAddRuleConditionSeed(var TempRuleCondition: Record "Expense Rule Condition"; var CategoryCode: Code[20]; var ExpenseLocationCode: Code[20]; var ConditionType: Enum "Expense Rule Condition Type"; var Value: Decimal; var IsHandled: Boolean)(integration)
Procedures
InsertAccountingDefaults()(internal)InsertManagementDefaults()(internal)InsertDefaultPostingGroups()(internal)BuildPostingGroupSeeds(var TempPostingGroup: Record "Expense Posting Group" temporary)(internal): Returns the catalogue of default expense posting groups without writing anything to the database. Use this for previewing what InsertDefaultPostingGroups would create.LoadPostingGroupsPreview(var TempPostingGroup: Record "Expense Posting Group" temporary)(internal): Builds the preview record set for expense posting groups: existing rows plus seeds that do not yet exist. No database writes are performed.AddPostingGroupSeed(var TempPostingGroup: Record "Expense Posting Group" temporary; Code: Code[20]; Description: Text[100]; RefundableDebitAccount: Code[20])(internal)InsertDefaultExpenseCategories()(internal)BuildCategorySeeds(var TempCategory: Record "Expense Category" temporary)(internal): Returns the catalogue of default expense categories without writing anything to the database.BuildSubcategorySeeds(var TempSubcategory: Record "Expense Subcategory" temporary)(internal): Returns the catalogue of default expense subcategories without writing anything to the database.GetTRAVELTxt(): Code[20](internal)GetCASHTxt(): Code[10](internal)GetPERDIEMTxt(): Code[20](internal)GetCANADAALLTxt(): Code[20](internal)GetDENMARKALLTxt(): Code[20](internal)GetDOMESTICTxt(): Code[20](internal)GetFRANCEALLTxt(): Code[20](internal)GetGERMANYALLTxt(): Code[20](internal)GetUKOTHERTxt(): Code[20](internal)GetEXPENSETRAVELTxt(): Code[20](internal)GetUSAOTHERTxt(): Code[20](internal)GetEXPENSEPERDIEMTxt(): Code[20](internal)GetEXPENSEOTHERTxt(): Code[20](internal)GetEXPENSEMILEAGETxt(): Code[20](internal)GetEXPENSEMEALSTxt(): Code[20](internal)GetEXPENSEENTERTAINTxt(): Code[20](internal)GetHOTELSTxt(): Code[20](internal)GetMEALSTxt(): Code[20](internal)GetMileageTxt(): Code[20](internal)GetMoraleTxt(): Code[20](internal)GetAIRLINETxt(): Code[20](internal)GetGROUNDTRANSTxt(): Code[20](internal)GetRENTALCARSTxt(): Code[20](internal)GetCARTxt(): Code[20](internal)GetEVENTSTxt(): Code[20](internal)GetENTERTAINTxt(): Code[20](internal)GetFOODTxt(): Code[20](internal)GetALCOHOLTxt(): Code[20](internal)GetROOMTxt(): Code[20](internal)GetBREAKFASTTxt(): Code[20](internal)GetDEPOSITTxt(): Code[20](internal)GetTAXTxt(): Code[20](internal)GetFEETxt(): Code[20](internal)GetPHONETxt(): Code[20](internal)GetINTERNETTxt(): Code[20](internal)GetINCIDENTSTxt(): Code[20](internal)GetLAUNDRYTxt(): Code[20](internal)GetROOMSERVICETxt(): Code[20](internal)GetPARKINGTxt(): Code[20](internal)GetOTHERTxt(): Code[20](internal)GetTIPSTxt(): Code[20](internal)GetTRANSPORTTxt(): Code[20](internal)LoadCategoriesPreview(var TempCategory: Record "Expense Category" temporary; var TempSubcategory: Record "Expense Subcategory" temporary)(internal): Builds the preview record set for expense categories and subcategories: existing rows plus seeds that do not yet exist. Seed subcategories are only proposed for categories that the defaults run will actually create; pre-existing categories are left alone, and so are their children. No database write…AddCategorySeed(var TempCategory: Record "Expense Category" temporary; Code: Code[20]; Description: Text[250]; PostingDescription: Text[100]; ExpenseGroupCode: Code[20]; PostingGroupCode: Code[20]; PaymentMethod: Code[10]; IsRefundable: Boolean; IsPrepayment: Boolean; AttachmentEnforcement: Enum "Expense Attachment Enforcement"; DetailRequired: Enum "Expense Detail Needed")(internal)AddSubcategorySeed(var TempSubcategory: Record "Expense Subcategory" temporary; SubcategoryCode: Code[20]; CategoryCode: Code[20]; Description: Text[250]; PostingDescription: Text[100]; Refundable: Boolean; DescriptionMandatory: Boolean)(internal)InsertDefaultExpenseLocations()(internal)SeedLocationShouldBeSkipped(SeedLocation: Record "Expense Location"): Boolean(internal)BuildSkippedSeedLocations(var TempSkippedLocation: Record "Expense Location" temporary)(internal)BuildLocationSeeds(var TempExpenseLocation: Record "Expense Location" temporary)(internal): Returns the catalogue of default expense locations without writing anything to the database.LoadLocationsPreview(var TempExpenseLocation: Record "Expense Location" temporary)(internal): Builds the preview record set for expense locations: existing rows plus seeds that do not yet exist. No database writes are performed.InsertDefaultManagementRules()(internal)BuildRuleSeeds(var TempRuleHeader: Record "Expense Rule Header" temporary)(internal): Returns the catalogue of default expense rule headers without writing anything to the database.BuildRuleConditionSeeds(var TempRuleCondition: Record "Expense Rule Condition" temporary)(internal): Returns the catalogue of default expense rule conditions without writing anything to the database.LoadRulesPreview(var TempRuleHeader: Record "Expense Rule Header" temporary; var TempRuleCondition: Record "Expense Rule Condition" temporary)(internal): Builds the preview record set for expense management rules: existing rows plus seeds that do not yet exist. Seed conditions are only proposed for rule headers that the defaults run will actually create; pre-existing rule headers are left alone, and so are their conditions. No database writes are per…AddRuleSeed(var TempRuleHeader: Record "Expense Rule Header" temporary; CategoryCode: Code[20]; ExpenseLocationCode: Code[20]; CurrencyCode: Code[10]; JustificationRequired: Enum "Expense Justification")(internal)AddRuleConditionSeed(var TempRuleCondition: Record "Expense Rule Condition" temporary; CategoryCode: Code[20]; ExpenseLocationCode: Code[20]; ConditionType: Enum "Expense Rule Condition Type"; Value: Decimal)(internal)InsertExpenseCategory(Code: Code[20]; Description: Text[250]; PostingDescription: Text[100]; ExpenseGroupCode: Code[20]; PostingGroupCode: Code[20]; PaymentMethod: Code[10]; IsRefundable: Boolean; IsPrepayment: Boolean; AttachmentEnforcement: Enum "Expense Attachment Enforcement"; DetailRequired: Enum "Expense Detail Needed")(internal)InsertExpenseSubcategory(SubcategoryCode: Code[20]; CategoryCode: Code[20]; Description: Text[250]; PostingDescription: Text[100]; Refundable: Boolean; DescriptionMandatory: Boolean)(internal)UpdateEmployeePostingGroup(Code: Code[20]; ExpenseReportPayableAccount: Code[20]; ExpensePayableBankPaidAccount: Code[20]; ExpensePayableCardPaidAccount: Code[20]; ExpenseReportPrepaymentAccount: Code[20])(internal)
Plus 7 local procedures.
Triggers
OnRun
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 6971 “Create Expense GL Account” (17 calls:
AddPostingGroupSeed → ExpenseCreditRoundingAccountNo,AddPostingGroupSeed → ExpenseDebitRoundingAccountNo,AddPostingGroupSeed → ExpenseMealNonRefundableDebitAccountNo, …) - Codeunit 6975 “Create Expense VAT Rates” (1 call:
OnRun → (object)) - Codeunit 7124 “Create Expense Locations” (1 call:
BuildLocationSeeds → (object)) - Codeunit 7126 “Create Expense Rule Conditions” (1 call:
BuildRuleConditionSeeds → (object)) - Codeunit 7128 “Create Expense Rule Headers” (1 call:
BuildRuleSeeds → (object))
Called by
- Codeunit 6975 “Create Expense VAT Rates” (772 calls:
CreateVATRatesAT → GetAIRLINETxt,CreateVATRatesAT → GetBREAKFASTTxt,CreateVATRatesAT → GetCARTxt, …) - Codeunit 7128 “Create Expense Rule Headers” (6 calls:
InsertExpenseRuleHeader → OnBeforeAddRuleSeed,InsertExpenseRuleHeaders → GetENTERTAINTxt,InsertExpenseRuleHeaders → GetHOTELSTxt, …) - Codeunit 7126 “Create Expense Rule Conditions” (4 calls:
CreateExpenseRuleConditions → GetENTERTAINTxt,CreateExpenseRuleConditions → GetMileageTxt,CreateExpenseRuleConditions → GetPERDIEMTxt, …) - Table 6930 “Expense Agent Setup” (4 calls:
CreateExpenseCategoriesDefaults → InsertDefaultExpenseCategories,CreateExpenseLocationsDefaults → InsertDefaultExpenseLocations,CreateManagementRulesDefaults → InsertDefaultManagementRules, …) - Page 6959 “Exp. Rules Preview” (1 call:
ReloadPreview → LoadRulesPreview) - Page 6966 “Exp. Categories Preview” (1 call:
ReloadPreview → LoadCategoriesPreview) - Page 6970 “Exp. Locations Preview” (1 call:
ReloadPreview → LoadLocationsPreview) - Page 6985 “Exp. Posting Groups Preview” (1 call:
ReloadPreview → LoadPostingGroupsPreview)
Recent changes
- 2026-09-15 #11425 Bug 650137: [29.x] Expense Locations and Per-diem rules in configuration - Backport (releases/29.x, BC29, feature)
- 2026-09-10 #10990 Add-Expense-VAT-settings-to-Contoso-demo-tool (main, BC30, feature)
- 2026-09-10 #10155 Slice 641293: [Expense Agent] Expense Locations and Per-diem rules in configurationAdded more locations (main, BC30, feature)
- 2026-08-28 #10637 [Master] - Bug 639548 [Expense Agent] Consolidate country demo data into single W1 app (main, BC30, refactor)
- 2026-08-04 #9859 [Master] - Move Expense Agent (Preview) app into BCApps (main, BC30, feature, added)
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Create Expense Categories"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.