I am trying to figure out how to retrieve the latest modified X number of components from a given publication and I've been staring at the Core Service API for ages trying to figure it out. Help!
The best I got is to latch on to the ModifiedAfter
and/or ModifiedBefore
search parameters in the SearchQueryData
class.
So here is what I got so far for my filter:
var filter = new SearchQueryData { ItemTypes = new[] { ItemType.Component }, SearchInSubtree = true };
if (!string.IsNullOrEmpty(publicationId))
{
filter.FromRepository = new LinkToRepositoryData() { IdRef = publicationId };
}
if(resultLimit > 0)
{
filter.ResultLimit = resultLimit;
}
All I need is a Sort Parameter property like on the CD side. Grrr!
Can anyone please suggest a solution?