Skip to content

Cleaning up PBI report setup on company lifecycle operations + Cleaning Sustainability artifacts#8166

Merged
mynjj merged 6 commits into
mainfrom
features/pbiautdepl3
May 20, 2026
Merged

Cleaning up PBI report setup on company lifecycle operations + Cleaning Sustainability artifacts#8166
mynjj merged 6 commits into
mainfrom
features/pbiautdepl3

Conversation

@mynjj
Copy link
Copy Markdown
Contributor

@mynjj mynjj commented May 15, 2026

What & why

  • Clean up the setup of Power BI reports after copying a company or environment
  • Removed Sustainability artifacts: Sustainability Power BI artifacts are now owned by the Sustainability app (which is in a different repo)

Linked work

Fixes AB#600448

Joshua Martínez Pineda and others added 3 commits May 13, 2026 14:11
…rface

Subscribe to "PBI Deployment Events".OnAfterDeleteAllDeploymentRecords (new
BaseApp event that fires after the per-company Power BI deployment rows are
wiped on env-copy and Copy Company) and clear the matching "PowerBI Reports
Setup" Report Id / Name pairs.

Replaces the two prior direct subscriptions to "Environment Cleanup"
.OnClearCompanyConfig and Report "Copy Company"
.OnAfterCreatedNewCompanyByCopyCompany — both BaseApp paths now route
through PowerBIDeployment.DeleteAllRecords, which raises the new event.

Switches from a hardcoded six-field clear to iterating
Enum::"PBI Report Setup" and clearing each implementation's reported
Id/Name field-no via RecordRef. Mirrors the populate-site pattern in
PowerBISubscribers.OnReportDeployed exactly, so third-party extensions
that register new app types are handled without changes here.

Side-effect: Inventory Valuation (already in the enum but absent from the
prior hardcoded list) is now also cleared.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sustainability is moving out of BCApps and will own its Power BI reports
directly. Delete the runtime data assets shipped from PowerBIReports:

- Power BI Files/Sustainability app/ (PBIP source: manifest + SemanticModel
  + Report folders)
- Power BI Files/Translations/Sustainability app/ (24 .resx translations)
- App/.resources/Sustainability app.pbix (compiled binary)
- Translations/LocProject.json — remove the Sustainability LocItem entry
  that pointed at the now-deleted translations folder

Backward-compat infrastructure is intentionally left in place for the
deprecation/removal cycle: App/_Obsolete/Sustainability/ (1 tableext + 11
embedded pages), the matching #if not CLEAN27 permission set block,
#if not CLEAN27 enum value blocks in the Test Library, and the page-
validation YAML drill-through hashes. Those will go in a future CLEAN27
pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label May 15, 2026
@github-actions github-actions Bot modified the milestone: Version 29.0 May 15, 2026
@mynjj mynjj marked this pull request as ready for review May 19, 2026 13:39
@mynjj mynjj requested a review from a team as a code owner May 19, 2026 13:39
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mynjj mynjj enabled auto-merge (squash) May 20, 2026 11:52
@mynjj mynjj merged commit 69d19ab into main May 20, 2026
64 of 68 checks passed
@mynjj mynjj deleted the features/pbiautdepl3 branch May 20, 2026 12:48
mynjj added a commit that referenced this pull request May 20, 2026
…ng Sustainability artifacts (#8166)

- Clean up the setup of Power BI reports after copying a company or
environment
- Removed Sustainability artifacts: Sustainability Power BI artifacts
are now owned by the Sustainability app (which is in a different repo)

Fixes
[AB#600448](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/600448)

---------

Co-authored-by: Joshua Martínez Pineda <diegojoshuam@microsoft.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mynjj added a commit that referenced this pull request May 25, 2026
…#8210)

Backport of #6763 to `releases/28.x` as prerequisite for the upcoming
backport of #8166.

Fixes
[AB#600448](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/600448)

---------

Co-authored-by: Joshua Martínez Pineda <diegojoshuam@microsoft.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants