Relationship changes and dead reports

Summer ‘08 is coming. There are a couple features that are hitting that will allow me to ditch a bunch of Apex code I’ve written. I’m kind of surprised at this, only 9 months after I got access to Apex, the platform is maturing to where things I did with Code can be done in much easier ways. Here are the features that are coming that will be most helpful in getting rid of Apex:

  1. Cross Object Formulas: The ability to show Parent data on the Child record will obviate the use of Apex for that kind of thing. I was doing this with a Contact in a Household–showing the Household Name and Greeting on the Contact. Won’t need to now, I can just create two formula fields.
  2. Double Master Detail: Having two master-detail records allows rollups in two directions. Right now I have some Apex to allow us to fund individual projects from Restricted Funding Pools. Project Funds is an object that pulls an amount from a Fund and applies it to a project. My Apex does the math and shows the money drawn down from the Fund and applied to the project. This will be completely obviated by Summary Rollups now that I have double master details.

Here’s a small problem. When I change text fields that are written by Apex to cross-object formula fields, I’ll have to tweak all the reports that use those fields. That makes sense, and it’s work that will be well worth it.

Here’s the big problem. By taking advantage of the new master-detail relationships, I have to change the relationship type, which ruins all reports that are based on that relationship. Turns out that the schema change takes 15 seconds, and the rebuilding of reports can take many, many hours.

In the project arena, we have over 100 reports that will potentially have to be rebuilt. And the real drag is that the old reports aren’t viewable after you change the relationship type, so you have to know what you want to rebuild ahead of time.

What I would love is this–if you change a relationship from lookup to master detail, it would be great if your reports were migrated for you. I have no idea how hard that would be because there is so much that happens behind the scenes with reporting. But the current situation is pretty rough when you want to change relationship structure.

I can only imagine what it must be like if a large organization wants to change schema to take advantage of the new double master detail. If there is anything Salesforce.com can do to mitigate this problem, I’d love to see it.

If reports ever get exposed via the metadata API that might help a lot–easier to tweak 100 text files rather than recreate 100 reports from scratch.

3 Responses to “Relationship changes and dead reports”

  1. Neal Mengel Says:

    Steve,

    I feel your pain. This is a problem I noted late last summer with a post to the community

    http://community.salesforce.com/sforce/board/message?board.id=discuss&thread.id=5817

    And an IdeaExchange submittal
    http://ideas.salesforce.com/article/show/74199/Complete_Conversion_on_Field_Type_Change

    I have been disappointed that the idea only received 60 votes. Maybe it can get more attention now.

    Neal

  2. Thomas Tobin Says:

    Reports based on CRTs will keep working when you change from lookup to master-detail and back again.
    Standard (auto-generated) report types are auto-regenerated when you rebuild the relationship.

  3. Steve Says:

    Thanks for the links Neal!

    Thanks for the info Tom, that’s great to know.

Leave a Reply