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
Jorg_JankeJorg_Janke 

This app can't be upgraded - global Visualforce components need

You can (unfortunately) delete a global Visualforce component in a packaged application.
Usually, you are prevented from modifying/deleting global Apex parts, etc - but there is no guard for global Visualforce component.

The component was not referenced for quite a few releases. The usual procedure to create a patch release and de-reference the deleted entities does not work - as they are not referenced.

As a user/developer, there are not any options to un-delete components.

What are my options?
 
Best Answer chosen by Jorg_Janke
NagendraNagendra (Salesforce Developers) 
Hi Jorg,

I am not pretty much sure on that, I guess it should allow you to upgrade.Still, you can give a try by attempting the above once.

Regards,
Nagendra.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Jorg,


There is this knowledge article for this kind of problem Removing Obsolete Visualforce from Managed Packages If you have already deleted and packaged up the changes to a new package you will need to follow the below steps to upgrade users to the new package version:
  1. Create a patch from the previous version WITH the VF pages
  2. In the patch update all VF pages to simply <apex:page/>
  3. Upgrade the customer to the patch version
  4. Upgrade the customer to the latest full version with the pages deleted
Basically, you need to upgrade to a version with the metadata modified to not reference anything first then you can update to the packages with the metadata deleted.

Please let us know if this helps.

Regards,
Nagendra.
Jorg_JankeJorg_Janke
Thanks Nagenda,

As it is a component not referenced by any page, should I then update it to
<apex:component/>
from
<apex:component ... access="global">
...
</apex:component>

Cheers,
Jorg 
 
NagendraNagendra (Salesforce Developers) 
Hi Jorg,

Yes, if that component is not referenced by any visual force page then you can update the component as above.

Mark this as solved if it helps.

Thanks,
Nagendra.
Jorg_JankeJorg_Janke
Actually, I cannot update it to
<apex:component/>
I get the error message: Error: Global component cannot be changed to non-global in managed application
(but I can delete it :-/)
So the option is
<apex:component access="global"/>
Will that allow to upgrade to a (non-patch) version where the component was deleted?
(seems there is no un-delete?)

Cheers,
Jorg 
 
NagendraNagendra (Salesforce Developers) 
Hi Jorg,

I am not pretty much sure on that, I guess it should allow you to upgrade.Still, you can give a try by attempting the above once.

Regards,
Nagendra.
This was selected as the best answer
Jorg_JankeJorg_Janke
Yes - after creating a patch with an empty component, the new version can be installed - Thanks!
<apex:component access="global"/>