3

How do I deprecate a custom field from a managed package? This package is being created by us, we wanted a field which was packaged by mistake to be deprecated or deleted from the Package. How can we do that?

  • 1
    You could request the feature "Delete packaged components" (or something along those lines). This feature lets you remove components that were included in a release upload of a managed packaged. You have to be careful with deleting though, it could actually break your package. – rael_kid May 25 '16 at 8:35
7

As @Lex said, you need to raise a Partner Community case to enable Component Deletion in your packaging organization. Once that is done, you can just simply remove the field from your packaging org. Whenever you package next (ie: the next version), the custom field will be removed. There are a couple of things to bear in mind:

  • If someone had a previous version of your package (with the custom field) and upgrades to a new one, the field will remain as unmanaged in their org
  • You will never be able to recreate the custom field on the same object with the same name again

Source: https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_managed_component_deletion.htm

3

A pragmatic - rather than ideal - approach is to change the label of the field; our convention is to add "(Deprecated)". So if the manual deployment instructions have not been followed to remove a field from a layout, this "(Deprecated)" acts as a visual indication for the customer that something is wrong.

(We adopted this convention before there was a mechanism to remove fields.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.