---
id: object/table/9657
type: object
title: Table 9657 "Custom Report Selection"
summary: Table 9657 "Custom Report Selection" in Base Application (Microsoft.Foundation.Reporting). 20 fields, 12 public procedures, 6 events. Present since at least BC23, still in BC30, changed in BC24, BC26-27.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "27"
  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: d2200c56fd16c532df3bb02645fb7a4d09e9cb1c77991d917a68454d12c79b5d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/CustomReportSelection.Table.al
    title: src/Layers/W1/BaseApp/Foundation/Reporting/CustomReportSelection.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 9657
name: Custom Report Selection
namespace: Microsoft.Foundation.Reporting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 20
  procedures: 27
  events: 6
  subscribers: 0
relations:
  out: 4
  referenced_by: 0
  pages: 2
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Table 9657 "Custom Report Selection"

> Table 9657 "Custom Report Selection" in Base Application (Microsoft.Foundation.Reporting). 20 fields, 12 public procedures, 6 events. Present since at least BC23, still in BC30, changed in BC24, BC26-27.

Base Application · Microsoft.Foundation.Reporting · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/CustomReportSelection.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Custom Report Selection |
| DataClassification | CustomerContent |

## 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 | Source Type | Integer | — |  |
| 2 | Source No. | Code[20] | — | TableRelation if ("Source Type" = const(18)) Customer."No." else if ("Source Type" = const(23)) Vendor."No." |
| 3 | Usage | Enum "Report Selection Usage" | — | enum [Enum 77 "Report Selection Usage"](../enum/77.md) |
| 4 | Sequence | Integer | — | AutoIncrement |
| 5 | Report ID | Integer | Specifies the ID of the report. | TableRelation "Report Metadata"."ID" |
| 6 | Report Caption | Text[250] | Specifies the name of the report. | FlowField: lookup("Report Metadata".Caption where("ID" = field("Report ID"))); not editable |
| 7 | Custom Report Layout Code | Code[20] | — | TableRelation [Table 9650 "Custom Report Layout"](../table/9650.md) ("Custom Report Layout" where(Code = field("Custom Report Layout Code"))) |
| 8 | Custom Report Description | Text[250] | Specifies a description of the custom report layout. | FlowField: lookup("Custom Report Layout".Description where(Code = field("Custom Report Layout Code"))) |
| 9 | Send To Email | Text[200] | Specifies that the report is used when sending emails. |  |
| 19 | Use for Email Attachment | Boolean | Specifies that summarized information, such as invoice number, due date, and payment service link, will be inserted in the body of the email that you send. |  |
| 20 | Use for Email Body | Boolean | Specifies that summarized information, such as invoice number, due date, and payment service link, will be inserted in the body of the email that you send. |  |
| 21 | Email Body Layout Code | Code[20] | Specifies the ID of the email body layout that is used. | TableRelation [Table 9650 "Custom Report Layout"](../table/9650.md) ("Custom Report Layout" where(Code = field("Email Body Layout Code"), "Report ID" = field("Report ID"))) |
| 22 | Email Body Layout Description | Text[250] | Specifies a description of the custom email body layout that is used. | FlowField: lookup("Custom Report Layout".Description where(Code = field("Email Body Layout Code"))); not editable |
| 23 | Use Email from Contact | Boolean | Use Email from Contacts <small>caption</small> |  |
| 24 | Selected Contacts Filter | Blob | — |  |
| 25 | Email Attachment Layout Name | Text[250] | Email attachment layout name <small>caption</small> | not editable |
| 26 | Email Attachment Layout AppID | Guid | Email attachment layout App ID <small>caption</small> | not editable |
| 27 | Email Body Layout Name | Text[250] | Email body layout name <small>caption</small> | not editable |
| 28 | Email Body Layout AppID | Guid | Email body layout App ID <small>caption</small> | not editable |
| 29 | Email Body Layout Caption | Text[250] | Specifies the description of the report layout that is used for email body. | FlowField: lookup("Report Layout List".Caption where("Report ID" = field("Report ID"), Name = field("Email Attachment Layout Name"))); not editable |

## Keys

- Key1: Source Type, Source No., Usage, Sequence (clustered)
- Key2: Report ID

## Events published

- `OnAfterFilterEmailBodyUsage(var CustomReportSelection: Record "Custom Report Selection"; NewSourceType: Integer; NewSourceNo: Code[20]; NewUsage: Option)` (integration)
- `OnBeforeGetSendToEmail(Update: Boolean; var Result: Text[250]; var IsHandled: Boolean)` (integration)
- `OnCopyFromReportSelections(var CustomReportSelection: Record "Custom Report Selection"; var ReportSelections: Record "Report Selections")` (integration)
- `OnCopyFromReportSelectionsOnBeforeInsert(var CustomReportSelection: Record "Custom Report Selection"; ReportSelections: Record "Report Selections")` (integration)
- `OnGetSendToEmailFromContacts(var CustomReportSelection: Record "Custom Report Selection"; var Contact: Record Contact; var ShowExceededContactsNotification: Boolean)` (integration)
- `OnGetSelectedContactsFilter(var SelectedContactsFilter: Text)` (integration)

## Procedures

- `InitUsage()`
- `FilterReportUsage(NewSourceType: Integer; NewSourceNo: Code[20]; NewUsage: Option)`
- `FilterEmailBodyUsage(NewSourceType: Integer; NewSourceNo: Code[20]; NewUsage: Option)`
- `LookupCustomReportDescription()`
- `LookupEmailBodyDescription()`
- `CheckEmailSendTo(DataRecRef: RecordRef)`
- `CopyFromReportSelections(var ReportSelections: Record "Report Selections"; SourceType: Integer; SourceNo: Code[20])`
- `GetSendToEmailFromContactsSelection(LinkType: Option; LinkNo: Code[20])`
- `GetSendToEmailFromContacts(var Contact: Record Contact)`
- `ShowSelectedContacts()`
- `GetSendToEmail(Update: Boolean): Text[250]`
- `UpdateSendtoEmail(Update: Boolean)`

Plus 9 local procedures.

## Triggers

OnInsert, OnModify

## Relations

- Custom Report Description: CalcFormula [Table 9650 "Custom Report Layout"](../table/9650.md)
- Email Body Layout Description: CalcFormula [Table 9650 "Custom Report Layout"](../table/9650.md)
- Custom Report Layout Code: TableRelation [Table 9650 "Custom Report Layout"](../table/9650.md)
- Email Body Layout Code: TableRelation [Table 9650 "Custom Report Layout"](../table/9650.md)

## Pages and codeunits on this table

- [Page 9657 "Customer Report Selections"](../page/9657.md) (source table)
- [Page 9658 "Vendor Report Selections"](../page/9658.md) (source table)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 28 "Error Message Management"](../codeunit/28.md) (1 call: `CheckEmailSendTo → LogError`)
- [Codeunit 46 "SelectionFilterManagement"](../codeunit/46.md) (1 call: `CombineContacts → GetSelectionFilterForContact`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26-27

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). The call sections above are our own, per object, from the BC29 call graph. 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: "Custom Report Selection")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
