1

This question already has an answer here:

I have a scenario:

Previous consultants and users had initially done some work inside our Production org (we have NEVER DEPLOYED to Production - they simply started to do the setup of this company's system there, then days/weeks later, created Sandboxes to continue the effort). They also installed managed packages that (most) will be used in the system (a couple will not).

There is no "return Production to virgin status" option built into SF.

Does anyone have information on how to properly "empty" a Production org, where Sandboxes are still attached and won't be affected?

I received a general response from SF, but it's not very helpful, especially if we're trying to keep this at an "Advanced SF Admin's" level.

After discussing this further, it is possible to use the Metadata API to delete the metadata in your Production org (with either the Force.com IDE, Workbench or ANT deployment tool), and this will leave your full sandbox unaffected. However, make sure not to refresh the sandbox after doing so until you've pushed the changes you want from full sandbox. We would not be able to do this for you but here are some documentation around these tools and the way to force destructive changes:

https://developer.salesforce.com/page/Propagating_Destructive_Changes http://www.jitendrazaa.com/blog/salesforce/salesforce-migration-tool-ant/

We have one single Object that will stay in Production with associated Chatter and file attachments.

Therefore, I want to "gut" Production, excluding:

  • Requirements custom object and it's data
  • Chatter (it will ONLY be on Requirements object anyway)
  • Any files uploaded (they will ONLY be on Requirements object)

My initial thought, keeping this out of a Developer level solution, is:

  • Uninstall ALL packages
  • Use Change Sets to identify anything "custom" per "area" and search-and-delete from there
  • Check for any data in any objects (other than Requirement) and delete (DataLoader/etc)

Is there something better? Is there a PACKAGE or UTILITY I don't know about that may do this?


UPDATE 2017-06-06: The idea is to keep this out of Developer-level solutions. [Advanced] Administrator level at the maximum.

marked as duplicate by battery.cord, Santanu Boral, Brian Mansfield, Ratan Paul, Lance Shi Jun 7 '17 at 6:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I'm not so sure it's directly related. Similar, yes. The answers are not helpful, plus they mention doing the "manifest" (which is something I'd spend time now learning), and I'd be curious how you include things in this manifest that ONLY EXIST in the Production, not in any (now) ANY of the Sandboxes. :-/ It's probably do-able - probably involves getting XML from Production, a text editor and/or Eclipse/Ant, whatever... But when NO devs are currently involved, I don't like the idea of that effort (from my limited view/current ability) :-/ – AMM Jun 6 '17 at 21:00
  • 1
    No worries. That is why it is marked as possible duplicate. Aditiomally. Daniel posted an answer below – glls Jun 6 '17 at 21:02
  • It would be great if those choosing to mark this as a Duplicate would understand that (a) it's not a duplicate, (b) the question referenced as a "duplicate" does not have an answer appropriate to this question, and (c) it would be nice if I could do something (other than alter my question, which I've already done per the instructions provided) to remove this annoying "marked as duplicate" x2 refereneces. :-P – AMM Jun 7 '17 at 17:18
  • I believe your the answer to your requirements is No. Hence the marked as suplicate since they are the ones most likely to help resolve your case. However. The title of your question is somewhat missleading, since it has the same title as the other quesrion. Just im other words. If you would have referenced the other question and explained why it doesnt answer yours it might have not been tagged as a duplicate and someone would have answered No. Srry – glls Jun 7 '17 at 17:25
4

A developer can do this efficiently with destructive changes via the Metadata API. One benefit of doing it this way is the XML file can be incrementally tested using the "Check Only" option against production until you are happy to pull the trigger and actually delete all the selected Metadata and corresponding records.

That said, there are tools like Gearset that can automate the process for you.

  • I agree, as this matches the information in my post, but unfortunately does not help with a non-Dev solution. I can "do Dev" when pushed,but the goal is to stay out of that arena. I believe my solution "would do the trick", but am hopeful to get some feedback on possibilities I did not come up with. THANK YOU for the info ;) – AMM Jun 6 '17 at 20:57
  • If an Admin can use Data Loader to perform CRUD operations based on an input file then they can apply a similar approach to deploy a destructiveChanges.xml via another tool. The principle is pretty much the same. Make the file in the required format, connect tool to the correct Salesforce org, have tool apply the file to the org. Do you want me to expand the answer with the steps that an admin could perform? – Daniel Ballinger Jun 6 '17 at 21:14
  • If it's not a problem to do so, yes, as I think it would benefit the SE database to have an answer for non-Devs to be able to do this. – AMM Jun 7 '17 at 17:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.