I would like to get the shared Pages for a Localized Component in WhereUsed with the Core Service. (The Page is created in a Parent Publication and shared, and the Component is Localized.)
The following code works and returns the Pages for the Component when the Page and Component are both created in the same Publication, but it does not return any Pages when the Component is on the Page in the parent Publication. I have a feeling I need another Filter, as that's usually the special sauce that makes the GetListXml sing.
Update: If I do not use the InRepository flag then I do get the Page, but in a Parent Publication. Then I could manipulate the URI and get my local Page. In my Blueprint scenario it works ok. Thoughts?
string compUri = "tcm:42-424242";
var comp = (ComponentData) client.Read(compUri, new ReadOptions());
LinkToRepositoryData pub = comp.LocationInfo.ContextRepository;
UsingItemsFilterData usingItemsFilterData = new UsingItemsFilterData
{
BaseColumns = ListBaseColumns.Default,
ItemTypes = new[] { ItemType.Page, ItemType.Component},
InRepository = pub,
IncludedVersions = VersionCondition.OnlyLatestVersions
};
XElement usingXML = client.GetListXml(compUri, usingItemsFilterData);