I've been working on a small consulting project for ~3 mo (100 hours), mostly Apex with a little configuration. I used a sandbox per recommendation. I started to work on the deploy process today and per official recommendations as I read them updated my developer sandbox first, after backing it up as best I could easily. Of course, the refresh blew away all my work: my code and my configuration. No option was provided to refresh less.

Why does Salesforce tell you to follow a process that deletes all your work?

I guess there was some implicit understanding I was supposed to have created some sort of changeset first? Was there some way to know that??

If they really want you to start fresh, couldn't they at least provide a backup option that backs up more than just your data? Or at least a prominent warning in the deploy documentation?

Is there any easy way to get my work back? (I'm not a total idiot; the Apex code I spent dozens of hours on is in my code repository and I can upload the files again and rebuild the trigger config.)

Official deploying doc I was trying to follow: https://developer.salesforce.com/docs/atlas.en-us.dev_lifecycle.meta/dev_lifecycle/deploy.htm

  • 1
    I think it means (or should read) refresh the sandbox BEFORE you start developing and refresh it after a new deployment so your sandbox is a good reflection of production. – Girbot Feb 1 '16 at 15:45
  • Hi Paul where does the deploying doc say to update your dev sandbox? – Fred Feb 1 '16 at 15:48
  • That was how I read paragraph 3. The only "staging environment" I have is my dev sandbox, and it strikes me as unlikely I'm supposed to pay for a second sandbox just to deploy my code to production. – Paul Feb 1 '16 at 15:53
  • To help future devs prevent this suffering, I finally found something that actually describes what gets refreshed (at least for small sandboxes): help.salesforce.com/apex/… – Paul Feb 1 '16 at 15:56
  • As a matter of fact indeed you would have to pay for a second full copy sandbox.. – Fred Feb 1 '16 at 15:56

Just heard from our AE that you have to contact SF within 72 hours and they may revert the changes for you. You have to log a case or give them a call.

  • Would that cost money? I've been looking at my IDE's to see if maybe they have the config saved, and it looks like even Eclipse does not. (My other one is IntelliJ/Illuminated Cloud, and I think I configured it to sync less metadata.) – Paul Feb 1 '16 at 16:18
  • So I tried to call the standard support number and the IVR makes clear they have no interest in talking to me unless we pay them money to upgrade to Premier Support. I even tried escaping out with 0 and # and *. That's underwhelming at $125/user/mo. – Paul Feb 1 '16 at 16:28
  • Ouch, sorry to hear that, I hope logging a case helps you out – Fred Feb 1 '16 at 16:37
  • 1
    Oh, it gets worse. They won't even let me open a case, because it's a "Developer" issue. My options seem to be limited to whining about it on Twitter and hoping someone hears or pleading with the operator. Actually, I suppose I'm supposed to post a HELP! message in the community and hope someone hears me. – Paul Feb 1 '16 at 16:53
  • 1
    No, contacting them directly through call would require premier support, for all other services and issues, you can log a case. Just go to setup and security > Org management or sales cloud > sales console for question and don't add developer sandbox, just write sandbox refresh and you might be able to log the case. – Dave Feb 1 '16 at 17:00

Purpose of Sandbox refresh is to clean all the data and align sandbox copy with production data. If you haven't moved data to production, you should not refresh sandbox (unless you want to take external backup/ export data using salesforce data export and do that head bugging process).

Sandbox refresh will remove all data from sandbox and will copy production data from scratch (i.e. Objects and fields).Also, only full copy of sandbox will copy all data inserted into object in production.

  • In the end I had two questions: what's going on and how do I fix it? So I had to pick only one as Answer, but upvoted them both. – Paul Feb 2 '16 at 17:29

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.