Asim saeed
Asim saeed

Reputation: 1

Salesforce has blocked this package upgrade because the new package version

Actually, we have deleted some components from the package and when we are installing it in the client’s org, it is giving us following error:

“Salesforce has blocked this package upgrade because the new package version removes some Apex code that one or more Visualforce pages or global Visualforce components need in order to function. Please contact your partner with this error information. Provide these component names to your partner. Visualforce Pages: abc.vf.”

i posted on salesforce support but got not make sense reponde

Upvotes: 0

Views: 1152

Answers (1)

David Reed
David Reed

Reputation: 2759

You've failed to complete the two-stage process for removing public Apex or Visualforce:

Because the managed package components behavior differs from the behavior of public Apex classes and public Visualforce components, use a two-stage process to delete Visualforce pages, global Visualforce components, and global Lightning components from a managed package. When you upgrade a package in a subscriber org, the Visualforce pages, global Visualforce components, or Lightning components that you deleted aren't removed. Although a Delete button or link is available to org administrators, many orgs continue using obsolete pages and components. However, public Apex classes and public Visualforce components are deleted as part of the upgrade process. If you delete pages and components without performing this two-stage procedure, Salesforce can’t warn you when later deletions of public classes and components break your subscribers’ obsolete pages and components

Emphasis mine. The error message is confusingly phrased; what most likely happened is you deleted some public Visualforce that referenced public Apex without executing the two-stage process described in the above link.

You'll have to create a patch version from the previous version of your package (before the deletion) to resolve this. In the patch version, blank out the content of the Visualforce page(s) or component(s) you deleted, specifically removing all references to Apex controllers. Upload the patch version. Then, you should be able to upgrade subscriber orgs from the previous version to the patch version and finally to your new version, where the Visualforce is completely removed.

Upvotes: 2

Related Questions