function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
soorya rsoorya r 

how to add deleted components to managed package

Hi All,

  I was deleted some pages and classes from managed package, and made a version 3.0 and uploading to appexchange after security review. Now I need to be added those deleted components again to managed package because we couldn’t upgrade the app from lower version to latest version by missing components. It saying the error is

"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."

I have checked with the "View deleted components" tab in package there i can only see the components and no option to undelete from there.

User-added image

And i have checked with recycle bin there i couldn't see my deleted components. 

Can any one guide me in dealing with this error.

Pls Urgent!

Thanks in advance!
Mohd UbaidMohd Ubaid

HI Soorya r,

As you mentioned you have deleted the pages and class from salesforce then you can't recover.

In recycle bin deleted metaData records(like pages,classes,etc) doesn't go , recycle bin is for deleted records not metaData records.

You must have backup of the code deploy into your org if not so in order to recover your deleted components you have to log a case to salesforce for your problem they will help you out in this.

If my answer is helpful mark it best answer...

Chaitanya EluriChaitanya Eluri
Hi Soorya r,

Did you find any resolution for this issue?
Jim GerrardJim Gerrard
Hi folks,

See this accepted answer:

-- J
soorya rsoorya r
Hi Jim, Actually I was faced this issue and resolve by this procedure. In your package you have to create a patch org for your lower version. In that patch org, you have to empty the page code and create a patch version. Before upgrade your new version you have to upgrade the patch version. Then try to upgrade new version then it should upgrade. Thanks, Soorya