3

I want to clean up one of my sandboxes.

I would like to replace a bunch of the objects which ones from another sandbox.

We'll call them this :

Receiving sandbox - "Old Sandbox" Deploying sandbox - "New Sandbox"

The Old Sandbox has extra unused components in its objects which I would like to get rid of. (unused Page Layouts ; unused fields etc)

I would love it if I could just deploy the objects from New Sandbox to Old Sandbox and automatically replace those objects with exact duplicates of the objects from New Sandbox - automatically deleting the unused compoents. Is there a way to do that ?

If there isn't way to do that then am I gonna be stuck deleting all of the unwanted components in Old Sandbox's objects ?

Or the other solution I guess would be to just delete all of the objects to be replaced in Old Sandbox and deploy the ones from New Sandbox ?

Does anybody have any advice on this ?

Thank you very much.

2
  • (VisualForce) Component actually has a specific meaning in Salesforce. – Adrian Larson Aug 2 '13 at 15:59
  • Yes, that's true. But when you are adding parts of an object to a Project in Eclipse you choose "Add\Remove Metadata Components". Hence, the reason for my terminology. – Zoom_v Aug 2 '13 at 17:05
1

You have a couple of options :

Refresh Sandbox - the most obvious one, where you can refresh a fresh copy from Production and then deploy components to it. You may have to back up any test data via Data Loader (or another AppExchange Product) and then reload to the refreshed sandbox.

Migration Tool - Use destructiveChanges.xml to delete unwanted components and then deploy the new / updated components using the Migration tool.

4
  • techtrekker - thank you very much for your response. Couple things : I can't do a refresh because that will wipe out other objects I don't want touched (at least I think it will). I have never used the Migration Tool, only Eclipse. Is there a benefit to using Migration Tool instead of Eclipse ? I know I could go into Eclipse and pick and choose components to delete, which sounds like what you're suggesting to do in Migration Tool. But maybe I'm missing something ? Either way, I was hoping to not have to delete parts of the object manually. Thanks again for your response. – Zoom_v Aug 2 '13 at 17:10
  • With the Migration Tool it all gets scripted out; you build the package once and then deploying it is dead simple. But it uses the same Metadata API as Eclipse. – Mike Chale Aug 2 '13 at 17:24
  • You can build the package once in Eclipse, can't you ? I would just make a Project, fill it up with the components I would like to include in my deploy and deploy. Then I could just use that project again in the future. I've never used Migration Tool so I don't know if that is different from what you're talking about....? – Zoom_v Aug 2 '13 at 17:31
  • 1
    To clarify, the Migration Toolkit and the Eclipse IDE use the exact same components; the Eclipse IDE just puts a pretty UI on top. Use whichever you feel more comfortable with. I'd say, if it is a one time deal, use Eclipse IDE and be done with it, but if you'd like to have an easy one-click version for future uses, use the Migration Toolkit. You can make a batch file that automatically deploys the changes with the click of a mouse button or keystroke. – sfdcfox Aug 2 '13 at 19:09

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.