---
id: change/bcapps/9359
type: change
title: "#9359 Sales Order Agent: ignore attachments larger than 25 MB during email retrieval"
summary: Sales Order Agent now ignores email attachments larger than 25 MB during retrieval and replaces them with placeholder notes to prevent email processing failures when oversized files are encountered.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit soa document events
  - enum soa email attachment status
  - codeunit soa retrieve emails
  - codeunit soa setup
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-16T01:17:10.523Z"
  flags: []
generated:
  at: "2026-10-24T01:02:25.817Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 36c7202a6fbc0cb28b79e0bc894de244cdfc9a5c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9359
    title: "microsoft/BCApps#9359: Sales Order Agent: ignore attachments larger than 25 MB during email retrieval"
    date: "2026-10-14"
    commit: 36c7202a6fbc0cb28b79e0bc894de244cdfc9a5c
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/4600
    - object/enum/4594
    - object/codeunit/4582
    - object/codeunit/4400
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/sales-order-agent-setup
      title: Set up Sales Order Agent
      label: possibly related
      why: Documents Sales Order Agent setup and configuration including email processing and handling.
      by: model
number: 9359
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9359
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-14T18:14:42Z"
author: qasimikram
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 80
  deletions: 22
  al: 4
apps:
  - SalesOrderAgent
objects_touched:
  - key: codeunit/4600
    page: codeunit/4600
    type: codeunit
    id: 4600
    name: SOA Document Events
    app: SalesOrderAgent
    status: modified
  - key: enum/4594
    page: enum/4594
    type: enum
    id: 4594
    name: SOA Email Attachment Status
    app: SalesOrderAgent
    status: modified
  - key: codeunit/4582
    page: codeunit/4582
    type: codeunit
    id: 4582
    name: SOA Retrieve Emails
    app: SalesOrderAgent
    status: modified
  - key: codeunit/4400
    page: codeunit/4400
    type: codeunit
    id: 4400
    name: SOA Setup
    app: SalesOrderAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 639715
systems:
  - copilot
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9359 Sales Order Agent: ignore attachments larger than 25 MB during email retrieval

> Sales Order Agent now ignores email attachments larger than 25 MB during retrieval and replaces them with placeholder notes to prevent email processing failures when oversized files are encountered.

[Pull request](https://github.com/microsoft/BCApps/pull/9359) · merged into `main` (BC30) on 2026-10-14 by qasimikram · 4 files (+80 -22), 4 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Attachment sizes are checked before content retrieval using EmailMessage.Attachments_GetLength()
- Oversized attachments are replaced with small placeholder text files ending in .ignored.txt
- Only non-ignored attachments are copied to sales quotes during attachment transfer
- New enum value ExceedsFileSize added to SOA Email Attachment Status to track ignore reason
- Telemetry is emitted for ignored attachments with original file details
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 4600 "SOA Document Events"](../../objects/codeunit/4600.md), SalesOrderAgent: modified
- [Enum 4594 "SOA Email Attachment Status"](../../objects/enum/4594.md), SalesOrderAgent: modified
- [Codeunit 4582 "SOA Retrieve Emails"](../../objects/codeunit/4582.md), SalesOrderAgent: modified
- [Codeunit 4400 "SOA Setup"](../../objects/codeunit/4400.md), SalesOrderAgent: modified

## Context

- Work items: AB#639715
- Labels: AL: Apps (W1), Team: SCM
- Systems: copilot

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Set up Sales Order Agent](https://learn.microsoft.com/dynamics365/business-central/sales-order-agent-setup) — possibly related: Documents Sales Order Agent setup and configuration including email processing and handling. (model-linked)

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).
