---
id: object/table/3320
type: object
title: Table 3320 "PA Email Cleanup Setup"
summary: Table 3320 "PA Email Cleanup Setup" in PayablesAgent (Microsoft.Agent.PayablesAgent). 9 fields, 5 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - payablesagent
versions:
  introduced: "29"
  last_changed: null
  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: 7ca7ae21956d3b4208e873edd47892d899922c52a726662f35657425100df852
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PayablesAgent/app/EmailStorageCleanup/PAEmailCleanupSetup.Table.al
    title: src/Apps/W1/PayablesAgent/app/EmailStorageCleanup/PAEmailCleanupSetup.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11950
    - change/bcapps/11890
object_type: table
object_id: 3320
name: PA Email Cleanup Setup
caption: Payables Agent Email Cleanup Setup
namespace: Microsoft.Agent.PayablesAgent
app: PayablesAgent
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 9
  procedures: 5
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 3320 "PA Email Cleanup Setup"

> Table 3320 "PA Email Cleanup Setup" in PayablesAgent (Microsoft.Agent.PayablesAgent). 9 fields, 5 public procedures. Introduced in BC29, still in BC30.

PayablesAgent · Microsoft.Agent.PayablesAgent · captioned "Payables Agent Email Cleanup Setup" · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PayablesAgent/app/EmailStorageCleanup/PAEmailCleanupSetup.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Payables Agent Email Cleanup Setup |
| Access | Internal |
| Extensible | false |
| DataClassification | SystemMetadata |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Primary Key | Code[10] | — |  |
| 10 | Commit Batch Size | Integer | Specifies how many Email Inbox rows are deleted before the deletions are committed. Smaller batches keep transactions and locks short on large inboxes; rows deleted before an interruption stay deleted. |  |
| 22 | Starting Date/Time | DateTime | Specifies the earliest date and time the background cleanup is allowed to start. |  |
| 30 | Job Queue Entry ID | Guid | — | not editable |
| 40 | Last Run At | DateTime | Specifies when the cleanup last deleted rows. <small>via [Page 3325 "PA Email Storage Cleanup"](../page/3325.md)</small> | not editable |
| 41 | Last Deleted Count | Integer | Specifies how many redundant copies the last run deleted. <small>via [Page 3325 "PA Email Storage Cleanup"](../page/3325.md)</small> | not editable |
| 42 | Last Skipped Count | Integer | Specifies how many copies the last run skipped because they were shared, sent, queued, or could not be deleted. <small>via [Page 3325 "PA Email Storage Cleanup"](../page/3325.md)</small> | not editable |
| 50 | Limit Rows To Delete | Boolean | Specifies whether a cleanup deletes only a limited number of copies. Enable this to do a small test run and verify the outcome before deleting everything. |  |
| 51 | Rows To Delete Limit | Integer | Specifies the maximum number of redundant copies a cleanup deletes in one run. Only used when "Limit rows to delete (test run)" is enabled. |  |

## Keys

- PK: Primary Key (clustered)

## Procedures

- `GetSingleton()`: Returns the singleton row, creating it on first use.
- `GetCommitBatchSize(): Integer`: Returns the persisted batch size, repairing it if it was never set or was stored with an invalid value.
- `DefaultCommitBatchSize(): Integer`
- `GetDeletionLimit(): Integer`
- `DefaultDeletionLimit(): Integer`

## Pages and codeunits on this table

- [Page 3325 "PA Email Storage Cleanup"](../page/3325.md) (source table)

## Recent changes

- 2026-09-28 [#11950 Adding an in-product email storage cleanup (backport to releases/29.x)](../../changes/bcapps/11950.md) (releases/29.x, BC29, feature, added)
- 2026-09-28 [#11890 Adding an in-product email storage cleanup](../../changes/bcapps/11890.md) (main, BC30, feature, added)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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). 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: "table", object_name: "PA Email Cleanup Setup")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
