---
id: object/report/202
type: object
title: Report 202 "Sales Document - Test"
summary: Report 202 "Sales Document - Test" in Base Application (Microsoft.Sales.Reports). 2 public procedures, 10 events. Present since at least BC23, still in BC30, changed in BC29.
tier: official
language: en
tags:
  - report
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: d2b5cdc42dc8b36055cc509cbe24e0f5610c1d39e19c0e488c1367fa618f7c50
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Reports/SalesDocumentTest.Report.al
    title: src/Layers/W1/BaseApp/Sales/Reports/SalesDocumentTest.Report.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/ca
    - localization/it
    - localization/mx
    - localization/us
  videos: []
  posts: []
  guidelines: []
object_type: report
object_id: 202
name: Sales Document - Test
namespace: Microsoft.Sales.Reports
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "29"
source_major: "29"
obsolete: null
countries:
  - ca
  - it
  - mx
  - us
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 10
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 2
  called_by: 0
  implements: 0
---

# Report 202 "Sales Document - Test"

> Report 202 "Sales Document - Test" in Base Application (Microsoft.Sales.Reports). 2 public procedures, 10 events. Present since at least BC23, still in BC30, changed in BC29.

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

## Properties

| Property | Value |
|---|---|
| Caption | Sales Document - Test |

## Events published

- `OnAfterCheckSalesDoc(SalesHeader: Record "Sales Header"; var ErrorText: array[99] of Text[250]; var ErrorCounter: Integer)` (integration)
  - subscribers: [Codeunit 4812 "Intrastat Report Doc. Compl."](../codeunit/4812.md) CheckIntrastatMandatoryFieldsOnAfterCheckSalesDocSalesDocumentTest
- `OnAfterCheckSalesDocLine(SalesLine: Record "Sales Line"; var ErrorText: array[99] of Text[250]; var ErrorCounter: Integer)` (integration)
- `OnAfterAddDimToTempLine(var SalesLine: Record "Sales Line")` (integration)
- `OnAfterSalesPostGetSalesLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary)` (integration)
- `OnBeforeCheckDimValuePostingHeader(var SalesHeader: Record "Sales Header"; var TableID: array[10] of Integer; var No: array[10] of Code[20])` (integration)
- `OnBeforeCheckDimValuePostingLine(var SalesLine: Record "Sales Line"; var TableID: array[10] of Integer; var No: array[10] of Code[20])` (integration)
- `OnBeforeCheckSalesLine(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ErrorCounter: Integer; var ErrorText: array[99] of Text[250])` (integration)
- `OnCheckSalesLineCaseTypeElse(LineType: Option; No.: Code[20]; var ErrorText: Text[250])` (integration)
- `OnAfterGetRecordSalesLineOnBeforeCheckDim(SalesLine: Record "Sales Line"; var GLAcc: Record "G/L Account"; OrigMaxLineNo: Integer; var IsHandled: Boolean)` (integration)
- `OnSalesHeaderOnAfterGetRecordOnBeforeVerifySellToCust(SalesHeader: Record "Sales Header"; var ErrorText: array[99] of Text[250]; var ErrorCounter: Integer)` (integration)

## Procedures

- `AddDimToTempLine(SalesLine: Record "Sales Line")`: Adds default dimensions to a temporary sales line for testing purposes.
- `InitializeRequest(NewShipReceiveOnNextPostReq: Boolean; NewInvOnNextPostReq: Boolean; NewShowDim: Boolean; NewShowCostAssignment: Boolean)`: Initializes the report request options for the Sales Document Test report.

Plus 8 local procedures.

## Triggers

OnInitReport, OnPreReport

## 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 408 "DimensionManagement"](../codeunit/408.md) (7 calls: `AddDimToTempLine → GetDefaultDimID`, `CheckRcptLines → CheckDimIDConsistency`, `CheckRcptLines → GetDimensionSet`, …)
- [Codeunit 5700 "User Setup Management"](../codeunit/5700.md) (1 call: `VerifyPostingDate → TestAllowedPostingDate`)

## Across versions

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

## Countries that replace it

[CA](../../localizations/ca.md), [IT](../../localizations/it.md), [MX](../../localizations/mx.md), [US](../../localizations/us.md)

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: "report", object_name: "Sales Document - Test")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
