When we try to open a dashboard using an account contact/non-administrator user, we get this error. It opens just fine as administrator.
Could not open dashboard due to the following error: Incorrect result size: expected 1, actual 2
We also see duplicates in the list of dashboards, the dashboard which is failing is listed twice.
DX UIM 23.4.2 and prior
This is related to a defect currently being investigated by engineering.
The issue occurs when you have a dashboard that is published to 'Public' and then you use that dashboard as a Data Source from another dashboard which is subsequently published to an Account.
When you publish a dashboard, if that dashboard has other dashboards which are used as Data Sources, you will see the following warning:
When you continue, and publish the dashboard specifically to an Account, the dashboards which are used as data sources get republished as a second copy of the dashboard which is also visible to that same Account.
In other words:
Dashboard "A" is Public
Dashboard "B" uses Dashboard "A" as a Data Source
Dashboard "B" gets published to an Account
Result:
Dashboard "A" is duplicated in the list - one copy for "Public" and one copy for "Account" and when you try to open it, you receive the above error.
The following query can be used to delete the "account-based" copies of the embedded dashboards.
This will leave the "public" ones alone, and it will leave the dashboards which are not duplicated alone.
In most cases this will solve the issue, because the Account-based dashboards can still use Public dashboards as a data source.
However, in some cases, you may have to republish the original 'Public' dashboards as 'Public' again.
If you then republish any additional 'Account' dashboards with datasources, the problem will return and you may need to run the query again.
delete from umpDashboardVisibility where visibility != 'public'
and id in (select id from umpDashboardVisibility where visibility = 'public');
This is being investigated by engineering so that in a future release, this will not be necessary.