Removing metadata that is being used downstream can have significant impacts on your users. For example, you may need to update a workflow definition and delete a workflow state. However, if you deliver the updated definition and your users have records in the removed workflow state, those records are locked and can no longer be edited, which can be detrimental to their business.
To remove metadata, you must first deprecate it. Deprecation is the process of informing your users that a feature is no longer supported and will be removed in a future release. This is essential to ensure your customers' data remains in a functional state when you delete metadata objects.
The process of removing delivered metadata occurs in the following stages, usually over the course of multiple releases:
| Stage | Release | Description |
|---|---|---|
| 1—Strategy | 1 | In general, you should strive to make sure that the applications you have already delivered work with any new or updated metadata and avoid removing anything you've already delivered. If you do need to remove objects, you must come up with a strategy of doing so that limits the impacts on your users. |
| 2—Deprecation | 1 | After you've determined the metadata you need to remove and determined a strategy for doing so, select Deprecate checkbox on each of the objects. When selected, each object displays a warning message when it's accessed in the Developer Studio. For example, if a logic block has been deprecated, a warning displays when it is opened in Logic Block Builder. Certain metadata objects, such as applications and reports, also display a warning if they are launched. |
| 3—Release notes | 1 or 2 | Using either the Release Note Builder application or an external tool of your choice, write a release note that informs the user that the metadata is no longer supported, and will be removed in a future release. In Release Note Builder, the Note Category should be Deprecation Notification. Do not delete any of the deprecated metadata during this stage in case you need to deliver a patch involving those objects.Sometimes, your users may need to take certain actions over the course of the release to ensure the integrity of their data and applications when you remove the deprecated metadata. For example, they may need to move some records out of a certain workflow state, or create copies of the deprecated metadata objects. If this is the case, you must clearly outline any required steps in the release note, and ensure that the Action Required checkbox on the note is selected. |
| 4—Removal | 2 or 3 | Confirm that your users are no longer using the deprecated objects and that removing those objects will not affect the integrity of their data. After this, you can delete the objects or move them to a product family that is not delivered, such as Playpen. |
Learn more in Best practices for objects released to production.