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

Removing custom field on custom object

I have the following situation.


I created a custom object with a custom field (with required set to true) + had this field on a page layout.  The field name is 'age'


I then released in a managed package



At a later date, requirements changed so I needed to split out the age field to save men's and women's age separately.  So I added 2 new custom fields ('mens age' and 'womens age').  


Now, I realize that since this object is in a managed package, I cannot delete the original age field nor can I uncheck the required.  So I set the default value of the field to 0 hoping I can just have it save with an arbitrary value since I don't use the field anymore.


However, if I goto the page layout I cannot remove or hide the original 'age' field since it is marked as required.


Any ideas on how I can get around this so from a user point of view they will not see the obsolete 'age' field on any screens?


You need to uninstall the package and then do necessary changes in previous org and again create package and install it into second org. No other possible way to edit the pages.


The other way is to write a Visualforce page as per your requirements, create package and install it into the second org.