Why is migrating changes between multiple orgs such a pain

So I’ve developed a couple of Salesforce / Force.com projects but the one thing I really hate is migrating changes between orgs. Maybe I’m doing it wrong, or I’m missing tools but something just snapped today.

I’m working on a fairly easy Salesforce project, a lot of custom fields, some custom objects, couple of queue’s, some assignment rules here and there. I’ve got 1 production org and 1 dev org. I’ve made some profile changes, layout changes, visualforce page changes and I’ve added some fields. So now the hard part, some changes are made via the IDE and some via the GUI. I want to deploy the “neat” way so I wanted to use the change sets. I’ve set them up and then. I don’t remember all of the fields I added, I don’t know all the dependencies, so I’ve added them all.

This all concluded in 1 big bloated change set. It gave me a couple of errors when I tried to upload it about some missing fields… So with these cryptic messages I changed over to the IDE, selected all the things I thought I needed and managed to deploy it to production.

So it’s a pain to deploy changes, especially if those changes have been made between 1 – 2 months. The project isn’t in source control (I know very bad working on it) but what about all those changed made via the GUI. Why can’t SF tell me what the DIFFS are between my “master” or production org and Sandboxes?

I guess I’m missing all the cool kid tools/scripts, but I couldn’t find any good tutorials about it. This leading to another somewhat related question. How do you set-up your development environment? I want to use the newest Eclipse, but it errors on me when I try to add the Force.com plugin, so i’m stuck with the IDE force.com provided. Which gives me errors along the lines of:

com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

So, what am I missing?

Answer

When you’re building something you know will be deployed, start building the change set at the same time. Every change you make to metadata, add it to the change set or to some spreadsheet you’re keeping of required manual changes.

Also, every time I make a new change set I mark it as “v1”, since I generally get up to at least v3 before the change set can be deployed. Inevitably I’ve forgotten a field or something and have to go back and clone v1, add the thing I forgot to v2, and re-upload. Have your change set uploaded and validated against the target org in advance of when you want to deploy, and then deployment can go quickly and smoothly, and you can just run through your manual actions. These things all mostly apply no matter whether you’re using Change Sets, Eclipse, or the migration tool.

Note that Eclipse allows for archiving of deployment and target metadata, so there is some record, admittedly not as complete as we would like. To see changes made in the UI, you can use the Setup Audit Trail log.

Attribution
Source : Link , Question Author : Daniël Zwijnenburg , Answer Author : Jeremy Nottingham

Leave a Comment