Skip to content

Add shared CompanyMetadata data source for report layouts#9093

Closed
v-mortenr wants to merge 1 commit into
microsoft:mainfrom
v-mortenr:features/638270/company-metadata-subscriber
Closed

Add shared CompanyMetadata data source for report layouts#9093
v-mortenr wants to merge 1 commit into
microsoft:mainfrom
v-mortenr:features/638270/company-metadata-subscriber

Conversation

@v-mortenr

Copy link
Copy Markdown
Contributor

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

  • ReportManagement subscribes to the platform GetCompanyMetadata business event and populates the shared company block (name, formatted address repeater, phone/fax/email/home page, bank details, VAT/registration/giro, logo) from Company Information.
  • New Company Metadata Builder codeunit (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.
  • CompanyDisplayName is sourced from the Company record (CompanyProperty.DisplayName(), falling back 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.
  • Adds Tests-Report coverage for values, captions, the display-name source, empty-safe behavior, and the address repeater.

Why draft

This consumes the GetCompanyMetadata business event on Reporting Triggers. The AL will compile in CI once BCApps uptakes a BCPlatform build that includes that event (current pin 29.0.51074.0 predates it). Kept as a draft until the platform uptake lands so the AL can be reviewed in the meantime.

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.
@github-actions github-actions Bot added the From Fork Pull request is coming from a fork label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

@v-mortenr v-mortenr closed this Jul 4, 2026
@v-mortenr

Copy link
Copy Markdown
Contributor Author

Superseded by #9094 — branch renamed to features/640703/company-metadata-subscriber to match work item AB#640703.

@v-mortenr
v-mortenr deleted the features/638270/company-metadata-subscriber branch July 4, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

From Fork Pull request is coming from a fork

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant