Skip to content

5 AL/BC patterns: document distribution (Report Selections, Document Sending Profile, Find Entries, TransferFields) - #175

Open
Michael Dieringer (MichaelDieringer) wants to merge 1 commit into
microsoft:mainfrom
Curabis:community-contribution/document-distribution-batch
Open

5 AL/BC patterns: document distribution (Report Selections, Document Sending Profile, Find Entries, TransferFields)#175
Michael Dieringer (MichaelDieringer) wants to merge 1 commit into
microsoft:mainfrom
Curabis:community-contribution/document-distribution-batch

Conversation

@MichaelDieringer

Copy link
Copy Markdown

Summary

Five rules about Business Central's document distribution architecture, verified against BCApps source and Microsoft Learn:

  • custom-document-dispatch-must-not-bypass-report-selections — a codeunit that hardcodes a report ID and builds its own email instead of registering through Report Selections loses per-account layout overrides and "Document Layouts" discoverability.
  • document-print-and-email-actions-call-report-selections-directly — a document's own Print/Email actions call Report Selections directly; Document Sending Profile is scoped specifically to the combined Post-and-Send action, not general print/email.
  • extend-find-entries-navigate-for-new-document-types — registering a custom table with Find Entries (page 344 Navigate) requires both OnAfterFindRecords and OnBeforeShowRecords; either alone leaves a result row with nothing to open it.
  • extend-report-selection-usage-for-new-document-types — a new Report Selection Usage value needs both ReportSelections.InsertRecord and a subscriber to the Customer/Vendor "Document Layouts" filter events, or the per-account override UI never lists the new document type.
  • transferfields-mirrored-fields-must-match-type-and-length — a field mirrored across a TransferFields posting cascade (e.g. Sales HeaderSales Invoice Header) must match type and length exactly; a length-only mismatch compiles and posts cleanly until a value finally exceeds the shorter definition.

Each article cites specific BCApps source (file, procedure, and in most cases line number) and, where applicable, Microsoft Learn. Wired into al-data-modeling-review.md's worklist cues so all five are reachable in review. Added a disambiguation note on the TransferFields article distinguishing it from the existing transferfields-skip-type-mismatch-can-drop-data.md — that article covers SkipFieldsNotMatchingType masking a type mismatch; this one covers the length dimension, which that parameter does not affect at all.

Test plan

  • CI frontmatter/format validation passes
  • Domain-owning reviewers confirm placement and accuracy per file

🤖 Generated with Claude Code

…ent Sending Profile, Find Entries, TransferFields)

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>
@MichaelDieringer

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="CURABIS ApS"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant