---
id: change/bcapps/11950
type: change
title: "#11950 Adding an in-product email storage cleanup (backport to releases/29.x)"
summary: Backport to BC29 of an email storage cleanup tool for the Payables Agent. It is reachable only through a URL parameter, helps find duplicate inbox emails and proactively sends admins steps for remediation.
tier: official
language: en
tags:
  - feature
  - releases/29.x
  - bc29
  - codeunit pa email cleanup
  - codeunit pa email cleanup runner
  - codeunit pa email cleanup scheduler
  - table pa email cleanup setup
  - table pa email duplicate buffer
  - page pa email duplicates
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:33.442Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: aa361f9b208c1345ec2811d20972d4610bfe2d06
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11950
    title: "microsoft/BCApps#11950: Adding an in-product email storage cleanup (backport to releases/29.x)"
    date: "2026-09-28"
    commit: aa361f9b208c1345ec2811d20972d4610bfe2d06
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/3322
    - object/codeunit/3323
    - object/codeunit/3324
    - object/table/3320
    - object/table/3321
    - object/page/3326
    - object/codeunit/3328
    - object/page/3325
    - object/permissionset/3304
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11950
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11950
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-09-28T15:12:47Z"
author: mynjj
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 9
  additions: 1128
  deletions: 1
  al: 9
apps:
  - PayablesAgent
objects_touched:
  - key: codeunit/3322
    page: codeunit/3322
    type: codeunit
    id: 3322
    name: PA Email Cleanup
    app: PayablesAgent
    status: added
  - key: codeunit/3323
    page: codeunit/3323
    type: codeunit
    id: 3323
    name: PA Email Cleanup Runner
    app: PayablesAgent
    status: added
  - key: codeunit/3324
    page: codeunit/3324
    type: codeunit
    id: 3324
    name: PA Email Cleanup Scheduler
    app: PayablesAgent
    status: added
  - key: table/3320
    page: table/3320
    type: table
    id: 3320
    name: PA Email Cleanup Setup
    app: PayablesAgent
    status: added
  - key: table/3321
    page: table/3321
    type: table
    id: 3321
    name: PA Email Duplicate Buffer
    app: PayablesAgent
    status: added
  - key: page/3326
    page: page/3326
    type: page
    id: 3326
    name: PA Email Duplicates
    app: PayablesAgent
    status: added
  - key: codeunit/3328
    page: codeunit/3328
    type: codeunit
    id: 3328
    name: PA Email Inbox Row Delete
    app: PayablesAgent
    status: added
  - key: page/3325
    page: page/3325
    type: page
    id: 3325
    name: PA Email Storage Cleanup
    app: PayablesAgent
    status: added
  - key: permissionset/3304
    page: permissionset/3304
    type: permissionset
    id: 3304
    name: Payables Ag. - Adm.
    app: PayablesAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 651503
systems:
  - development
quote: null
joined_against:
  major: "29"
  commit: 1d24dd5ee2a734510f0556ccc69342d0e616db2f
---

# #11950 Adding an in-product email storage cleanup (backport to releases/29.x)

> Backport to BC29 of an email storage cleanup tool for the Payables Agent. It is reachable only through a URL parameter, helps find duplicate inbox emails and proactively sends admins steps for remediation.

[Pull request](https://github.com/microsoft/BCApps/pull/11950) · merged into `releases/29.x` (BC29) on 2026-09-28 by mynjj · 9 files (+1128 -1), 9 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Adds the PA Email Storage Cleanup page, reachable only through a URL parameter
- Adds a setup table, a duplicate buffer table and a duplicates page
- Adds codeunits for cleanup, a runner, a scheduler and inbox row deletion
- Extends the Payables Ag. - Adm. permission set
- Backport of PR 11890 to releases/29.x
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 3322 "PA Email Cleanup"](../../objects/codeunit/3322.md), PayablesAgent: added
- [Codeunit 3323 "PA Email Cleanup Runner"](../../objects/codeunit/3323.md), PayablesAgent: added
- [Codeunit 3324 "PA Email Cleanup Scheduler"](../../objects/codeunit/3324.md), PayablesAgent: added
- [Table 3320 "PA Email Cleanup Setup"](../../objects/table/3320.md), PayablesAgent: added
- [Table 3321 "PA Email Duplicate Buffer"](../../objects/table/3321.md), PayablesAgent: added
- [Page 3326 "PA Email Duplicates"](../../objects/page/3326.md), PayablesAgent: added
- [Codeunit 3328 "PA Email Inbox Row Delete"](../../objects/codeunit/3328.md), PayablesAgent: added
- [Page 3325 "PA Email Storage Cleanup"](../../objects/page/3325.md), PayablesAgent: added
- [Permission set 3304 "Payables Ag. - Adm."](../../objects/permissionset/3304.md), PayablesAgent: modified

## Context

- Work items: AB#651503
- Labels: AL: Apps (W1), Team: Finance
- 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).
