Advice needed on packaging dynamic dashboards

dashboardlimitsmanaged-package

Our build just broke with this error when we added a 4th dynamic dashboard:

You reached the limit for dashboards run as the logged-in user

and articles like this one Increase 'Maximum Number of Dynamic Dashboards' limit indicate why:

This defines the limit on Dynamic Dashboards permitted for use within
the environment, based on the organization edition.

The following are the default values:

  • Enterprise Edition: up to 5 per organization.
  • Performance and Unlimited Edition: up to 10 per organization.
  • Developer Edition: up to 3 per organization.

as our project-scratch-def.json specifies "edition": "Developer".

But this begs the question of what happens when the org the managed package is installed into already has dynamic dashboards set up so the limit is exceeded? A failed install? Is including any of these in a managed package therefore an anti-pattern?

Best Answer

...what happens when the org the managed package is installed into already has dynamic dashboards set up so the limit is exceeded? A failed install?

Yep. It can also fail push upgrades for extra confusion if both you and the subscriber have created dynamic dashboards.

Is including any of these in a managed package therefore an anti-pattern?

Yep. Because the dynamic dashboard limit is not namespace-scoped, including them in a managed package is an anti-pattern unless you control all of the environments in which the package will be installed. If necessary, deliver the dynamic dashboards in a separate extension package that subscribers can choose to install or not install.