Thursday, December 10, 2009

Multiple levels of Master-Detail coming in Spring 10

Steve Anderson of Salesforce Foundation just posted on the NPSF group website that among other great features Salesforce is planning to release in Spring 2010; 4 steps of Master-Detail relationships comes out too. For those of us who have been there, this is huge!

Previously, if you wanted to create (as I recently encountered with one of our customers') multiple objects in hierarchy where Object A is at the top, B is A's child, and C is B's child, you had to pick between which relationship was more important and sacrifice the other. Example, say you have an object called "Festival" and an object called "Position" and another called "Candidate". Candidates apply for a specific Position that is created just for a specific Festival. Previously you would create a Master-Detail between Position and Festival and a look-up between Position and Candidate. When you deleted a Festival, all Positions will go away, which is great but related Candidate records would hang without a Position (not so great). Such records would have to be manually deleted (or programmers could use a trigger).

With upcoming multiple levels of Master-Detail you can relate the above objects in a relationship which connects all three in a series. You delete Festival, and Positions and Candidates both go away. Not only that, now you would be able to create a roll-up on Position object totaling number of Candidates who applied!