Context: I have a managed package and I removed a field from the latest version of the package. Now Although the field is not part of package the customer org still has the field and relevant data in it.
Requirement: Since the deprecated field contains sensitive data and has security risks, so I want to clean data from those fields.
What I tried:
- Update Value for deprecated field from Post-install script, it didn't work (Error: Field API name is not valid)
- Tried to query the field from
anonymous Window
in the developer console, it didn't work - Queried field from
Query editor
in developer console, It worked - Tried to create an
Apex class
in customer org with Version setting dependency of package set to an older version of the managed package and It worked
Is there a way to automate the clean data process for deprecated metadata from customer org?
Any best practice suggestion/opinion will also help