Skip to content

Add shared CompanyMetadata data source for report layouts#9094

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

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

Conversation

@v-mortenr

@v-mortenr v-mortenr commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

  • 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.

@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 added the Linked Issue is linked to a Azure Boards work item label Jul 4, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 4, 2026
@github-actions github-actions Bot added the needs-approval Workflow runs require maintainer approval to start label Jul 4, 2026
@v-mortenr v-mortenr force-pushed the features/640703/company-metadata-subscriber branch 2 times, most recently from 1e787d4 to 5935848 Compare July 4, 2026 19:17
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.
@v-mortenr v-mortenr force-pushed the features/640703/company-metadata-subscriber branch from 5935848 to 617853f Compare July 4, 2026 19:40
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 Linked Issue is linked to a Azure Boards work item needs-approval Workflow runs require maintainer approval to start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant