---
title: "Query 8889 Sent Emails, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/query/8889-sent-emails/points/
object: https://jonas-paprotka.de/ref/query/8889-sent-emails/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/query/8889-sent-emails/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Query 8889 Sent Emails, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/query/8889-sent-emails/points/

6 procedures and triggers with a step in src/System Application/App/Email/src/Email/Sent/SentEmails.Query.al, in source order, read from the text, not from a run.

## GetSentEmails

[Line 73](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L73).

- [78](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L78) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) DeleteAll
- [80](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L80) calls `CopyFiltersFrom`
- [91](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L91) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) Insert

## InsertRecordInto

[Line 107](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L107).

- [113](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L113) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) Insert

## InsertRecordIfAnyRelatedRecords

[Line 117](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L117).

- [141](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L141) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) Insert
- [142](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L142) calls `ReadUntilNextMessageId`

## InsertRecordIfAllRelatedRecords

[Line 151](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L151).

- [169](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L169) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) Insert
- [179](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L179) calls `ReadUntilNextMessageId`
- [191](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L191) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) Insert

## GetSentEmailsIfAccessToAllRelatedRecords

[Line 199](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L199).

- [208](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L208) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) DeleteAll
- [209](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L209) calls `CopyFiltersFrom`
- [225](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L225) calls `InsertRecordInto`
- [226](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L226) calls `ReadUntilNextMessageId`
- [232](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L232) calls `InsertRecordIfAllRelatedRecords`

## GetSentEmailsIfAccessToAnyRelatedRecords

[Line 241](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L241).

- [250](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L250) writes [Table 8889 Sent Email](https://jonas-paprotka.de/ref/table/8889-sent-email/) DeleteAll
- [251](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L251) calls `CopyFiltersFrom`
- [267](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L267) calls `InsertRecordInto`
- [268](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L268) calls `ReadUntilNextMessageId`
- [274](https://jonas-paprotka.de/ref/query/8889-sent-emails/source/#L274) calls `InsertRecordIfAnyRelatedRecords`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
