AnsweredAssumed Answered

Finding "orphaned" child records

Question asked by RickWhitelaw on Oct 6, 2009
Latest reply on Oct 13, 2009 by RickWhitelaw

Title

Finding "orphaned" child records

Post

Hello,

 

Let's say I have a set of 50 "parent" records, each of which has 20 "child" records. To find if there are or aren't orphaned child records is easy. If there are more than 1000 child records related to the group of parent records there are records that shouldn't be there. This situation can arise when a user, rather than deleting a "parent" record, chooses to alter it after "child" records have been created from the original parent. It gets more complicated when there are several other groups of "parent" records with various numbers of "child" records.

My question: is there a way to find child records that don't have a parent record?

To be clear, I've set up the relevant relationships to delete child records when a parent record is deleted. Also, I'm in the process of scripting, with "On Modify" triggers, all appropriate fields in the parent records to prevent alteration where it's an issue, so the problem will cease to exist. Also, I know how to do this with a looped script omitting records as it loops. Somehow I suspect I'm missing something obvious and simple.

 

Thanks. 

Outcomes