Codeunit 1886 "Environment Cleanup"
System Application · System.DataAdministration
Across versions
- BC23-30present
Neighbourhood 17 connected objects and pages
System Application · System.DataAdministration · BC23-30 · source at 7178ca28 · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Public |
Events published
OnClearCompanyConfig(CompanyName: Text; SourceEnv: Enum "Environment Type"; DestinationEnv: Enum "Environment Type")(integration): Subscribe to this event to clean up company-specific data when copying to a new environment.- subscribers: Codeunit 20105 “AMC Banking Mgt.” AMCOnClearCompanyConfiguration, Codeunit 30273 “Shpfy Installer” ShpfyOnClearCompanyConfiguration, Codeunit 4509 “Email - Outlook API Helper” ClearCompanyConfigGeneral, Codeunit 4513 “SMTP Connector Impl.” ClearCompanyConfigGeneral, Codeunit 4560 “Ext. Blob Sto. Connector Impl.” EnvironmentCleanup_OnClearCompanyConfig, Codeunit 4570 “Ext. File Share Connector Impl” EnvironmentCleanup_OnClearCompanyConfig, Codeunit 4580 “Ext. SharePoint Connector Impl” EnvironmentCleanup_OnClearCompanyConfig, Codeunit 4621 “Ext. SFTP Connector Impl” EnvironmentCleanup_OnClearCompanyConfig, Codeunit 6351 “PBI Deployment Events” ClearDeploymentRecordsOnEnvironmentCopy, Codeunit 6619 “FS Environment Cleanup Subs” ClearFSConnectionOnEnvironmentCopy, Codeunit 7237 “Master Data Mgt. Subscribers” ClearCrossEnvSecretOnEnvironmentCopy, Codeunit 8912 “Environment Cleanup Subs” ClearCompanyConfigGeneral, Codeunit 8912 “Environment Cleanup Subs” ClearCompanyConfigProdToProd
OnClearDatabaseConfig(SourceEnv: Enum "Environment Type"; DestinationEnv: Enum "Environment Type")(integration): Subscribe to this event to clean up environment-specific data when copying to a new environment.- subscribers: Codeunit 48500 “Fabric Env. Cleanup Subs.” OnClearDatabaseConfig, Codeunit 6153 “API Webhook Notification Mgt.” HandleOnClearCompanyConfig, Codeunit 8912 “Environment Cleanup Subs” ClearDatabaseConfigGeneral, Codeunit 8912 “Environment Cleanup Subs” ClearDatabaseConfigProdToProd
Called by
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 1887 “Environment Cleanup Impl” (2 calls:
OnAfterCopyEnvironmentPerCompany → OnClearCompanyConfig,OnAfterCopyEnvironmentPerDatabase → OnClearDatabaseConfig)
Linked pages
- 🧹 Cleaning and anonymizing copies in Business Central: environments, companies, and traceability — names: builds an anonymize-and-log solution on the environment cleanup events (checked by hand)
- Copy an environment — documents: the cleanup events this codeunit raises run when an environment is copied (checked by hand)
- Production and Sandbox Environments — documents: lists what a copy disables and clears (job queue, agents, integration setups, webhooks), the cleanup these events carry out (checked by hand)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- #13005 [Master Data Management] Cleanup when copying environment — possibly related: touches Codeunit 7237, which subscribes to OnClearCompanyConfig (data/index/events.json, BC29) (checked by hand)
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: "Environment Cleanup"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.