Add shared CompanyMetadata data source for report layouts#9094
Draft
v-mortenr wants to merge 1 commit into
Draft
Add shared CompanyMetadata data source for report layouts#9094v-mortenr wants to merge 1 commit into
v-mortenr wants to merge 1 commit into
Conversation
1e787d4 to
5935848
Compare
Work item: AB#640703 Subscribe to the platform GetCompanyMetadata business event in ReportManagement and populate a shared company block (name, formatted address, phone/fax/email/ home page, bank, VAT/registration, giro, logo) from Company Information, so report layouts can bind one shared source instead of hand-coding company fields. - New Company Metadata Builder codeunit: typed setters centralize the wire keys (the subscriber never hand-writes raw key strings), including the address-line repeater and paired field captions. - CompanyDisplayName is sourced from the Company record (CompanyProperty.DisplayName, fallback to CompanyName) to match how the platform builds ReportRequest, not Company Information "Name 2". - Empty-safe: absent Company Information fields emit present-but-empty values. - Add Tests-Report coverage for values, captions, display-name source, empty-safe behavior, and the address repeater.
5935848 to
617853f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work item: AB#640703
Adds a shared CompanyMetadata data source so report layouts can bind one shared company block instead of each report hand-coding Company Information fields.
What
ReportManagementsubscribes to the platformGetCompanyMetadatabusiness event and populates the shared company block (name, formatted address repeater, phone/fax/email/home page, bank details, VAT/registration/giro, logo) fromCompany Information.Company Metadata Buildercodeunit (Access = Internal): typed setters centralize the wire keys so the subscriber never hand-writes raw key strings; includes the address-line repeater and the paired field captions.CompanyDisplayNameis sourced from the Company record (CompanyProperty.DisplayName(), falling back toCompanyName()) to match how the platform buildsReportRequest— not Company Information "Name 2".Tests-Reportcoverage for values, captions, the display-name source, empty-safe behavior, and the address repeater.Why draft
This consumes the
GetCompanyMetadatabusiness event onReporting Triggers. The AL will compile in CI once BCApps uptakes a BCPlatform build that includes that event (current pin29.0.51074.0predates it). Kept as a draft until the platform uptake lands so the AL can be reviewed in the meantime.