+ Start a Discussion

Dependant Fields In Package

I have a some apex classes which i want to install as a package to a another org.

And there are some custom fields which are reffered by these classes.

They already exist in the org which i'm going to install the package.

So when i try to install it gives a duplicate error.

Is there any way to remove these custom fields from the package or overwrite the existing fileds.

Tony P.ax1100Tony P.ax1100

You'll need to remove all the dependencies (workflows, apex, visualforce) on the fields in your target org, then delete them.  Then you'll need to install the package into the target org.  Then you can go back and update your references to use the new fields from your package.  If the target org is production, you'll need to have scheduled maintenance and make sure you do an export of your data, then reload the data after you're done.


Thanks tony for your reply.

I found a way of doing this using Migration Tools.


Tony P.ax1100Tony P.ax1100

Ant is a great way to handle this for sure.  You can get your package.xml ready ahead of time and you can even do deletes with a different package.xml script (using destructive package), etc.