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>
22 lines
824 B
AL
22 lines
824 B
AL
codeunit 50102 "Sample Settlement Document Send"
|
|
{
|
|
procedure SendSettlementDocument(var Customer: Record Customer)
|
|
var
|
|
ReportSelections: Record "Report Selections";
|
|
begin
|
|
// Custom validation specific to this document stays here...
|
|
CheckReadyToSend(Customer);
|
|
|
|
// ...but dispatch goes through the registered usage, so per-account
|
|
// report/layout overrides and email attachment/body configuration
|
|
// on Report Selections all apply automatically.
|
|
ReportSelections.SendEmailToCust(
|
|
"Report Selection Usage"::"S.Invoice".AsInteger(), Customer, Customer."No.",
|
|
Customer.Name, true, Customer."No.");
|
|
end;
|
|
|
|
local procedure CheckReadyToSend(var Customer: Record Customer)
|
|
begin
|
|
Customer.TestField("E-Mail");
|
|
end;
|
|
}
|