+ Start a Discussion
RCJesseRCJesse 

Traversing ParentId of Note object

We are moving away from the Contract object. I would like to make copies of the notes whose ParentId's are Contracts into another custom object. I've tried using the data loader but I don't think it can perform the kind of query I need. Since Notes have a ParentId field, how can I traverse them knowing the parents are Contracts. I would like to get the AccountId from the Contract object.

 

So I would like to go Note->ParentId->AccountId Where i know ParentId is a Contract object which I know has an Id that starts with "800".

 

Any help would be really appreciated.Thanks. 

SuperfellSuperfell

You can look at the type of the parent row to filter to just contracts, e.g.

 

select id, body, parentId from note where parent.type='Contract'

RCJesseRCJesse
Thanks Simon, got me just a little bit closed. I ended up just writing an apex script instead of trying to do it with the data loader.