---
id: object/table/6927
type: object
title: Table 6927 "Expense Rule Header"
summary: Table 6927 "Expense Rule Header" in ExpenseAgent (Microsoft.ExpenseAgent). 8 fields, 2 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - expenseagent
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: bba80be7e74834ffc5d4b45f621fe40b25c7f9175fc13e6421d2c6253b1cd63f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/MasterData/Tables/ExpenseRuleHeader.Table.al
    title: src/Apps/W1/ExpenseAgent/app/src/MasterData/Tables/ExpenseRuleHeader.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-categories-rules
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/expense-management-preview/set-up-expense-management
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11425
    - change/bcapps/10155
    - change/bcapps/10020
    - change/bcapps/9859
object_type: table
object_id: 6927
name: Expense Rule Header
namespace: Microsoft.ExpenseAgent
app: ExpenseAgent
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 8
  procedures: 6
  events: 0
  subscribers: 0
relations:
  out: 5
  referenced_by: 0
  pages: 4
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 6927 "Expense Rule Header"

> Table 6927 "Expense Rule Header" in ExpenseAgent (Microsoft.ExpenseAgent). 8 fields, 2 public procedures. Introduced in BC29, still in BC30.

ExpenseAgent · Microsoft.ExpenseAgent · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/MasterData/Tables/ExpenseRuleHeader.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 6900 "Expense Management Rules"](../page/6900.md) (1 Learn page), [Page 6901 "Expense Rule Card"](../page/6901.md) (1).

## Properties

| Property | Value |
|---|---|
| Caption | Expense Rule Header |
| Access | Internal |
| DataClassification | CustomerContent |
| LookupPageId | Expense Management Rules |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Expense Category Code | Code[20] | Specifies the expense category for this rule. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> | TableRelation [Table 6921 "Expense Category"](../table/6921.md) (Expense Category); NotBlank |
| 2 | Expense Location | Code[20] | Specifies the expense location for this rule. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> | TableRelation [Table 6925 "Expense Location"](../table/6925.md) (Expense Location) |
| 3 | Effective Date | Date | Specifies when this rule becomes effective. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> |  |
| 30 | Justification Required | Enum "Expense Justification" | Specifies when justification is required for expenses under this rule. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> | enum [Enum 6908 "Expense Justification"](../enum/6908.md) |
| 40 | Required Specific Merchant | Boolean | Specifies if a specific merchant is required for this expense category and location. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> |  |
| 41 | Specific Merchant Name | Text[100] | Specifies the required merchant name. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> |  |
| 60 | Currency Code | Code[10] | Specifies the required currency code for expenses under this rule. Leave blank if any currency is allowed. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> | TableRelation [Table 4 "Currency"](../table/4.md) |
| 61 | Unit of Measure Code | Code[10] | Specifies the required unit of measure code for mileage expenses under this rule (e.g., Miles, Kilometers). Leave blank if any unit of measure is allowed. <small>via [Page 6901 "Expense Rule Card"](../page/6901.md)</small> | TableRelation [Table 204 "Unit of Measure"](../table/204.md) (Unit of Measure) |

## Keys

- PK: Expense Category Code, Expense Location, Effective Date (clustered)

## Procedures

- `FindApplicableRule(ExpenseReportLine: Record "Expense Report Line"): Boolean`
- `FindApplicableRule(Expense: Record Expense): Boolean`

Plus 4 local procedures.

## Triggers

OnDelete, OnRename

## Relations

- lookup page [Page 6900 "Expense Management Rules"](../page/6900.md)
- Unit of Measure Code: TableRelation [Table 204 "Unit of Measure"](../table/204.md)
- Currency Code: TableRelation [Table 4 "Currency"](../table/4.md)
- Expense Category Code: TableRelation [Table 6921 "Expense Category"](../table/6921.md)
- Expense Location: TableRelation [Table 6925 "Expense Location"](../table/6925.md)

## Pages and codeunits on this table

- [Page 6900 "Expense Management Rules"](../page/6900.md) (source table)
- [Page 6901 "Expense Rule Card"](../page/6901.md) (source table)
- [Page 6923 "Expense Rules API"](../page/6923.md) (source table)
- [Page 6959 "Exp. Rules Preview"](../page/6959.md) (source table)
- [Codeunit 7128 "Create Expense Rule Headers"](../codeunit/7128.md) (codeunit runs on it)

## Recent changes

- 2026-09-15 [#11425 Bug 650137: [29.x] Expense Locations and Per-diem rules in configuration - Backport](../../changes/bcapps/11425.md) (releases/29.x, BC29, feature)
- 2026-09-10 [#10155 Slice 641293: [Expense Agent] Expense Locations and Per-diem rules in configurationAdded more locations](../../changes/bcapps/10155.md) (main, BC30, feature)
- 2026-08-14 [#10020 [Master] - Bug 641894: [Expense Agent] [Rules] Mileage expense should not validate require receipt number rule](../../changes/bcapps/10020.md) (main, BC30, fix)
- 2026-08-04 [#9859 [Master] - Move Expense Agent (Preview) app into BCApps](../../changes/bcapps/9859.md) (main, BC30, feature, added)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). 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: "table", object_name: "Expense Rule Header")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
