mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Five rules about Business Central's document distribution architecture, verified against BCApps source and Microsoft Learn. - custom-document-dispatch-must-not-bypass-report-selections - document-print-and-email-actions-call-report-selections-directly - extend-find-entries-navigate-for-new-document-types - extend-report-selection-usage-for-new-document-types - transferfields-mirrored-fields-must-match-type-and-length Wired into al-data-modeling-review.md's worklist cues. Added a disambiguation note on the TransferFields article distinguishing it from the existing transferfields-skip-type-mismatch-can-drop-data.md (type-mismatch skipping vs. length mismatch, which SkipFieldsNotMatchingType does not affect). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
866 B
AL
28 lines
866 B
AL
report 50102 "Sample Settlement Doc Bad"
|
|
{
|
|
UsageCategory = ReportsAndAnalysis;
|
|
ApplicationArea = All;
|
|
|
|
dataset
|
|
{
|
|
dataitem(Customer; Customer)
|
|
{
|
|
column(No_Customer; "No.") { }
|
|
}
|
|
}
|
|
}
|
|
|
|
codeunit 50102 "Sample Settlement Document Send"
|
|
{
|
|
procedure SendSettlementDocument(var Customer: Record Customer)
|
|
begin
|
|
Customer.TestField("E-Mail");
|
|
|
|
// WRONG: hardcoded report, no Report Selections row backing it.
|
|
// Works for the default case, but there is nowhere for an admin to
|
|
// change the report or layout for one specific customer - this
|
|
// document never shows up on "Document Layouts" at all, and the
|
|
// only way to change it is a code change and a new release.
|
|
Report.RunModal(Report::"Sample Settlement Doc Bad", false, false, Customer);
|
|
end;
|
|
}
|