---
id: change/bcapps/8771
type: change
title: "#8771 Add OnBeforeFilterRemovedSourceRecords integration event in Email Impl"
summary: Adds an OnBeforeFilterRemovedSourceRecords integration event with an IsHandled guard, published via the Email codeunit and raised in Email Impl's FilterRemovedSourceRecords. Partners can override the default permission-based filtering, for example to handle users with security filters on source tables.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit email
  - codeunit email impl
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:03.158Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 1e0fad2c02a30b701d0460d6c1b80b85f855c7c0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/8771
    title: "microsoft/BCApps#8771: Add OnBeforeFilterRemovedSourceRecords integration event in Email Impl"
    date: "2026-07-20"
    commit: 1e0fad2c02a30b701d0460d6c1b80b85f855c7c0
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/8901
    - object/codeunit/8900
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 8771
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/8771
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-20T20:13:32Z"
author: Groenbech96
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: System Application"
  - From Fork
  - "Team: Integrations"
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 2
  additions: 12
  deletions: 0
  al: 2
apps:
  - System Application
objects_touched:
  - key: codeunit/8901
    page: codeunit/8901
    type: codeunit
    id: 8901
    name: Email
    app: System Application
    status: modified
  - key: codeunit/8900
    page: codeunit/8900
    type: codeunit
    id: 8900
    name: Email Impl
    app: System Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642092
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #8771 Add OnBeforeFilterRemovedSourceRecords integration event in Email Impl

> Adds an OnBeforeFilterRemovedSourceRecords integration event with an IsHandled guard, published via the Email codeunit and raised in Email Impl's FilterRemovedSourceRecords. Partners can override the default permission-based filtering, for example to handle users with security filters on source tables.

[Pull request](https://github.com/microsoft/BCApps/pull/8771) · merged into `main` (BC30) on 2026-07-20 by Groenbech96 (community contribution) · 2 files (+12 -0), 2 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New OnBefore event with IsHandled is raised at the start of FilterRemovedSourceRecords
- Lets subscribers replace the unfiltered ReadPermission check, for example by setting SecurityFiltering to Ignored
- Default filtering is unchanged when no subscriber sets IsHandled
- Follows the existing event pattern in the Email codeunit's Events region
- Gives partners a way to address missing attachments in Add file from source document for security-filtered users

## AL objects touched

- [Codeunit 8901 "Email"](../../objects/codeunit/8901.md), System Application: modified
- [Codeunit 8900 "Email Impl"](../../objects/codeunit/8900.md), System Application: modified

## Context

- Work items: AB#642092
- Labels: ADO: Sync, AL: System Application, From Fork, Team: Integrations
- Systems: development

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
