We need to rename about 15 custom objects in a force.com.
In Java, this would be a right click and about 20 minutes work, but given the number of soql queries, classes, pages, profiles etc that use these object, we're looking at a week, two weeks... or more.
So, ideally, we're looking for a refactoring tool which will help us rename this objects and resolve any interdependencies.
Force.com IDE naturally, doesn't support this. Any ideas/tools/approaches?
We did that with two objects and it was a royal pain, I can image 15 poses quite a challenge. As you noticed by now salesforce constructs are highly interdependent with cross, even circular references being legit. THis on the other hand makes tear-down and core modification very difficult and virtually impossible to automate.
What you can do is following:
- Use sandbox for modifications, do an inventory of all constructs using affected objects. You can use Ctrl-H to search the entire workspace in IDE
- On sandbox, clone those 15 objects into their respective future names, they'll be empty but who cares on sandbox.
- Now that you have objects in place, rename all mentions in all constructs from #1 to use new objects
- Just to make sure try to delete old objects from sandbox, this will serve as a sanity check that you didn't miss any dependency.
- Off work hours delete the entire inventory of #1 from production server, leaving just bare objects with their data
- Now that the dependencies are gone, rename all 15 objects
- In one session deploy the entire modified inventory from sandbox to production, since the payload now uses new object names the tests should pass.
I dont think it should take you more than a day for all this.