1

I have a Managed Package.This package have reports.

Subscriber had deleted reports from the package, and when he is trying to upgrade his org, he get this error:

Record_Page flexipages/Record_Page.flexipageComponent [flexipage:reportChart] attribute [reportName]: Invalid reportName ReportForSomething - no reports found

I know, that for this issue can help deleting this report from this page.

But is there another way to fix this?

I need to use this report in future, and I cant every upgrade create special version without this report for specific subscriber.

2 Answers 2

3

This is a very tricky issue. There are multiple avenues to potential resolution, none of them particularly happy.

When I previously encountered this problem my understanding was that it was an issue with the platform (failing to protect the component due to the reference from a non-deletable package component). I am not aware of a KI for this issue however. (This is not an official statement on behalf of my employer, Salesforce).

Restoring the Report

This behavior can be produced if the subscriber either deletes the report or moves it into a private folder (where the context user for the package upgrade can't see it).

If it's in a private folder, the subscriber can just put it back.

If the subscriber deleted the report and they did so less than 30 days ago, they can restore it. One way to do so is to perform a Metadata API deployment containing just the Report metadata, which you could supply to the subscriber. More than 30 days out, however, this will just throw an error.

Replacing the Report

You mentioned that you do not want to remove the report because you plan to use it in the future. Another option is to delete this report, but replace it with an identical one that you show in the same position on your record page.

Then, you protect that report by establishing a reference to it from another managed component that does create that relationship protecting it from deletion. If I recall correctly (it's been a while), I used a Dashboard to do this. The Dashboard can itself be deleted by the subscriber (breaking the protection link), but it should at least make it more difficult for the subscriber to break their org in this way.

2
  • thank you so much ! <3 this information very useful for me Apr 12, 2022 at 9:27
  • how to make Metadata API deployment containing just the Report metadata from Managed package? Apr 15, 2022 at 10:06
0

There is a Known Issue for this. Additionally, I recently discovered the following workaround:

Steps for the ISV:

  1. Create an SFDX project: sf project generate --name MyProject
  2. Copy the Report file that the customer (subscriber) had deleted, along with the Report Folder that contains it, into the new SFDX project under force-app/main/default/reports
  3. Edit the Report Folder name and Report file name to add the namespace

Example directory structure:

reports

----myNamespace__MyReportFolder

---------myNamespace__MyReport.report-meta.xml
  1. Either deploy the Report to the customer org if they give you consent and permission, or share this SFDX project directory with the customer (subscriber) so they can deploy it themselves

4a. If the customer will do this, they would need to install the Salesforce CLI and authorize it with their org first

4b. Then, to deploy the report, they can run the command

sf project deploy start -m Report:myNamespace__MyReportFolder/myNamespace__MyReport

or right-click the Report file in VSCode and click SFDX: Deploy Source to Org in the popup menu

  1. The customer (subscriber) org can now receive package upgrades successfully

Hat tip to @Vivek Chawla for helping to discover this solution

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .