---
id: object/codeunit/9452
type: object
title: Codeunit 9452 "File Scenario"
summary: Codeunit 9452 "File Scenario" in System Application (System.ExternalFileStorage). 6 public procedures, 1 events. Introduced in BC26, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "26"
  last_changed: "28"
  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: d4f6b3a99d8e67a15413caca76d12182fc2a1bc82e3de9e417e530b16b432221
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/External%20File%20Storage/src/Scenario/FileScenario.Codeunit.al
    title: src/System Application/App/External File Storage/src/Scenario/FileScenario.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: 9452
name: File Scenario
namespace: System.ExternalFileStorage
app: System Application
extends: null
first_version: "26"
last_version: "30"
present_in:
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 7
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 6
  implements: 0
---

# Codeunit 9452 "File Scenario"

> Codeunit 9452 "File Scenario" in System Application (System.ExternalFileStorage). 6 public procedures, 1 events. Introduced in BC26, still in BC30, changed in BC28.

System Application · System.ExternalFileStorage · BC26-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/External%20File%20Storage/src/Scenario/FileScenario.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeInsertAvailableFileScenario(Scenario: Enum "File Scenario"; var IsAvailable: Boolean)` (integration): Event for changing whether an file scenario should be added to the list of assignable scenarios. If the scenario has already been assigned or is the default scenario, this event won't be published.

## Procedures

- `GetDefaultFileAccount(var TempFileAccount: Record "File Account" temporary): Boolean`
- `GetFileAccount(Scenario: Enum "File Scenario"; var TempFileAccount: Record "File Account" temporary): Boolean`: Gets the file account used by the given file scenario. If the no account is defined for the provided scenario, the default account (if defined) will be returned.
- `GetSpecificFileAccount(Scenario: Enum "File Scenario"; var TempFileAccount: Record "File Account" temporary): Boolean`: Gets the file account used by the given file scenario.
- `SetDefaultFileAccount(TempFileAccount: Record "File Account" temporary)`: Sets a default file account.
- `SetFileAccount(Scenario: Enum "File Scenario"; TempFileAccount: Record "File Account" temporary)`: Sets a file account to be used by the given file scenario.
- `UnassignScenario(Scenario: Enum "File Scenario")`: Unassign an file scenario. The scenario will then use the default file account.

## 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 9453 "File Scenario Impl."](../codeunit/9453.md) (6 calls: `GetDefaultFileAccount → GetFileAccount`, `GetFileAccount → GetFileAccount`, `GetSpecificFileAccount → GetSpecificFileAccount`, …)

## Called by

- [Codeunit 8751 "DA External Storage Impl."](../codeunit/8751.md) (10 calls: `BeforeAddOrModifyFileScenarioCheck → GetSpecificFileAccount`, `DeleteExternalFile → GetSpecificFileAccount`, `DownloadFromExternalStorage → GetSpecificFileAccount`, …)
- [Codeunit 9451 "File Account Impl."](../codeunit/9451.md) (3 calls: `DefaultAccountDeletion → UnassignScenario`, `DeleteAccounts → GetDefaultFileAccount`, `MakeDefault → SetDefaultFileAccount`)
- [Codeunit 9453 "File Scenario Impl."](../codeunit/9453.md) (1 call: `GetAvailableScenariosForAccount → OnBeforeInsertAvailableFileScenario`)
- [Codeunit 9455 "External File Storage Impl."](../codeunit/9455.md) (1 call: `Initialize → GetFileAccount`)
- [Page 9450 "File Accounts"](../page/9450.md) (1 call: `UpdateFileAccounts → GetDefaultFileAccount`)
- [Page 9451 "File Account Wizard"](../page/9451.md) (1 call: `OnInit → GetDefaultFileAccount`)

## Implemented by

- [Codeunit 8751 "DA External Storage Impl."](../codeunit/8751.md)
- [Codeunit 9459 "Default File Scenario Impl."](../codeunit/9459.md)
- [Enum 9451 "File Scenario"](../enum/9451.md)

## Across versions

- Present in: BC26-30
- Changed (declaration) in: BC28

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