Probably I am missing something obvious, but I can't see how to find out the owning repository (ie the publication where a component is created) when I have opened a component with the Core Service... ComponentData.LocationInfo
only has ContextRepository
, which I guess is the publication which I opened the component in.
Add a comment
|
1 Answer
Either ComponentData.BluePrintInfo.OwningRepository
or ComponentData.BluePrintInfo.PrimaryBluePrintParentItem
is what you are looking for, depending on whether you need the parent of the item or the item in the top of the BluePrint chain where it was created in.
-
1Thanks Bart - I also see PrimaryBluePrintParentItem - I guess this is the real parent, and OwningRepository can be the place where the item has been localized between its parent and context publications... right? Commented Feb 13, 2014 at 13:16
-
@WillPrice Yup that is my understanding too, so you might indeed need
ComponentData.BluePrintInfo.PrimaryBluePrintParentItem
Commented Feb 13, 2014 at 13:22