---
id: object/codeunit/6908
type: object
title: Codeunit 6908 "Expense Event Subscriber"
summary: Codeunit 6908 "Expense Event Subscriber" in ExpenseAgent (Microsoft.ExpenseAgent). 1 public procedures, 17 event subscribers. Introduced in BC29, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - expenseagent
versions:
  introduced: "29"
  last_changed: "30"
  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: a1275f9b4cf5541dfde61627c448ff85d3ce83ff373c40049569d849211a4d81
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/Setup/Codeunits/ExpenseEventSubscriber.Codeunit.al
    title: src/Apps/W1/ExpenseAgent/app/src/Setup/Codeunits/ExpenseEventSubscriber.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12074
    - change/bcapps/11593
    - change/bcapps/11007
    - change/bcapps/11153
    - change/bcapps/10404
    - change/bcapps/9988
    - change/bcapps/9391
    - change/bcapps/9859
object_type: codeunit
object_id: 6908
name: Expense Event Subscriber
namespace: Microsoft.ExpenseAgent
app: ExpenseAgent
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 24
  events: 0
  subscribers: 17
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 6908 "Expense Event Subscriber"

> Codeunit 6908 "Expense Event Subscriber" in ExpenseAgent (Microsoft.ExpenseAgent). 1 public procedures, 17 event subscribers. Introduced in BC29, still in BC30, changed in BC30.

ExpenseAgent · Microsoft.ExpenseAgent · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/Setup/Codeunits/ExpenseEventSubscriber.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata User = r |

## Event subscriptions

- ValidateExpenseAgentLoginNotAllowed subscribes to Codeunit "System Initialization" OnAfterInitialization
- OnShowPostedDocumentOnBeforePageRun subscribes to Codeunit "Instruction Mgt." OnShowPostedDocumentOnBeforePageRun
- OnBeforeCheckDocType subscribes to Codeunit "Gen. Jnl.-Check Line" OnBeforeCheckDocType
- OnBeforeGetEmployeePayablesAccount subscribes to Codeunit "Gen. Jnl.-Post Line" OnBeforeGetEmployeePayablesAccount
- OnAfterGetEmployeePayablesAccount subscribes to Codeunit "Gen. Jnl.-Post Line" OnAfterGetEmployeePayablesAccount
- OnAfterFromJnlLineToLedgEntry subscribes to Codeunit "Job Transfer Line" OnAfterFromJnlLineToLedgEntry
- OnAfterValidateFirstNameEvent subscribes to Table "Employee" OnAfterValidateEvent (First Name)
- OnAfterValidateMiddleNameEvent subscribes to Table "Employee" OnAfterValidateEvent (Middle Name)
- OnAfterValidateLastNameEvent subscribes to Table "Employee" OnAfterValidateEvent (Last Name)
- OnBeforeDeleteEmployeeEvent subscribes to Table "Employee" OnBeforeDeleteEvent
- OnAfterDeleteEmployeeEvent subscribes to Table "Employee" OnAfterDeleteEvent
- OnAfterValidateCompanyEmailEvent subscribes to Table "Employee" OnAfterValidateEvent (Company E-Mail)
- OnAfterValidateJobTitleEvent subscribes to Table "Employee" OnAfterValidateEvent (Job Title)
- OnAfterInsertExpenseEvent subscribes to Table "Expense" OnAfterInsertEvent
- OnBeforeCheckGLEntryReversalEntryEvent subscribes to Table "Reversal Entry" OnBeforeCheckGLEntry
- OnBeforeReleaseSpendRequest subscribes to Codeunit "Release Spend Request" OnBeforeRelease
- OnAfterReleaseSpendRequest subscribes to Codeunit "Release Spend Request" OnAfterRelease

## Procedures

- `IsSourceExpense(SourceCode: Code[10]): Boolean` (internal)

Plus 6 local procedures.

## 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 27 "Confirm Management"](../codeunit/27.md) (1 call: `CheckEmployeeEmailCanBeChangedInExpenseUser → GetResponseOrDefault`)
- [Codeunit 4312 "Agent Session"](../codeunit/4312.md) (1 call: `ValidateExpenseAgentLoginNotAllowed → IsAgentSession`)

## Recent changes

- 2026-10-02 [#12074 Expense Agent: travel request expense location, per-traveler reports, activity log and submitter comment](../../changes/bcapps/12074.md) (main, BC30, feature)
- 2026-09-23 [#11593 [29.x] - Bug 650481[Expense Agent] Closed travel requests are editable and are missing approver info.](../../changes/bcapps/11593.md) (releases/29.x, BC29, fix)
- 2026-09-09 [#11007 Add Travel Request API lifecycle to Expense Agent](../../changes/bcapps/11007.md) (main, BC30, feature)
- 2026-09-08 [#11153 Bug 649312: [29.x] Backport expense request report layout and dataclassification on userid field](../../changes/bcapps/11153.md) (releases/29.x, BC29, fix)
- 2026-09-03 [#10404 Deliverable 638799: Requisitions in Base App - add layout to report + minor fixes](../../changes/bcapps/10404.md) (main, BC30, feature)
- 2026-08-13 [#9988 [Expense Agent] Fix Employee subscriber permissions](../../changes/bcapps/9988.md) (main, BC30, fix)
- 2026-08-10 [#9391 [Master] - Slice 616928: [Expense Management] [App part] Expense Managements Travel Requisitions 💸](../../changes/bcapps/9391.md) (main, BC30, feature)
- 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: BC30

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). 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: "Expense Event Subscriber")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
