---
id: object/codeunit/8892
type: object
title: Codeunit 8892 "Email Scenario Impl."
summary: Codeunit 8892 "Email Scenario Impl." in System Application (System.Email). 9 public procedures. Present since at least BC23, still in BC30, changed in BC24.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "24"
  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: f82dd6662c9d53d4d875658a89fd0bcfac0ad1ee7b20b82f3abb59d79e201aba
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Email/src/Scenario/EmailScenarioImpl.Codeunit.al
    title: src/System Application/App/Email/src/Scenario/EmailScenarioImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 8892
name: Email Scenario Impl.
namespace: System.Email
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 12
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 3
  implements: 0
---

# Codeunit 8892 "Email Scenario Impl."

> Codeunit 8892 "Email Scenario Impl." in System Application (System.Email). 9 public procedures. Present since at least BC23, still in BC30, changed in BC24.

System Application · System.Email · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Email/src/Scenario/EmailScenarioImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata "Email Scenario" = rimd |

## Procedures

- `GetEmailAccount(Scenario: Enum "Email Scenario"; var EmailAccount: Record "Email Account"): Boolean`
- `IsThereEmailAccountSetForScenario(Scenario: Enum "Email Scenario"): Boolean`
- `SetEmailAccount(Scenario: Enum "Email Scenario"; EmailAccount: Record "Email Account")`
- `UnassignScenario(Scenario: Enum "Email Scenario")`
- `GetScenariosByEmailAccount(var Result: Record "Email Account Scenario")`: Get a list of entries, representing a tree structure with email accounts and the scenarios, assigned to each accout.
- `AddScenarios(EmailAccount: Record "Email Account Scenario"): Boolean`
- `GetAvailableScenariosForAccount(EmailAccount: Record "Email Account Scenario"; var EmailScenarios: Record "Email Account Scenario"; IncludeDefaultEmailScenario: Boolean)`
- `ChangeAccount(var EmailScenario: Record "Email Account Scenario"): Boolean`
- `DeleteScenario(var EmailScenario: Record "Email Account Scenario"): Boolean`

Plus 3 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 8889 "Email Account Impl."](../codeunit/8889.md) (3 calls: `AddScenarios → CheckPermissions`, `ChangeAccount → CheckPermissions`, `DeleteScenario → CheckPermissions`)
- [Codeunit 8894 "Email Account"](../codeunit/8894.md) (3 calls: `ChangeAccount → GetAllAccounts`, `GetEmailAccount → GetAllAccounts`, `GetScenariosByEmailAccount → GetAllAccounts`)
- [Codeunit 8893 "Email Scenario"](../codeunit/8893.md) (1 call: `GetAvailableScenariosForAccount → OnBeforeInsertAvailableEmailScenario`)

## Called by

- [Codeunit 8893 "Email Scenario"](../codeunit/8893.md) (6 calls: `GetDefaultEmailAccount → GetEmailAccount`, `GetEmailAccount → GetEmailAccount`, `IsThereEmailAccountSetForScenario → IsThereEmailAccountSetForScenario`, …)
- [Page 8893 "Email Scenario Setup"](../page/8893.md) (1 call: `OnOpenPage → GetScenariosByEmailAccount`)
- [Page 8894 "Email Scenarios for Account"](../page/8894.md) (1 call: `OnOpenPage → GetAvailableScenariosForAccount`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24

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: "Email Scenario Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
