Suppose I have a component used in many pages' components which I want to update based on a specific schema. It's not feasible to do this manually so I'm writing a small Core Service console app to do this for me.
So far I have:
var filter = new UsingItemsFilterData
{
BaseColumns = ListBaseColumns.Id,
ItemTypes = new[] { ItemType.Component }
};
var results = CoreServiceFactory.CreateCoreService().GetListXml("tcm:xx-xxxxxx", filter);
Console.WriteLine($"Components Found: {results.Nodes().Count()});
This returns 500+ components. Inspecting the results, it's returning a list of TCM IDs.
Is there a way to specify via UsingItemsFilterData
to return items of a certain ItemTypes
AND Schema
so that I can further reduce the number of items returned? Is there another way I can do this apart from my current approach?
I'm unable to find an appropriate method within the documentation (ICoreService201603).