1

I'm trying to get all the components modified after a particular date using core service

Here is the code:

            // Search query
            SearchQueryData filter = new SearchQueryData();
            DateTime date = new DateTime(2015, 03, 25);
            filter.ModifiedAfter = date;
            filter.ItemTypes = new ItemType[]
            {
                ItemType.Component,
                ItemType.ComponentTemplate,
                ItemType.Page,
                                 ItemType.PageTemplate,
                ItemType.Publication,
                ItemType.Schema
            };

            //returns the list of items changed by date
            IdentifiableObjectData[] data = client.GetSearchResults(filter);

The code returns me all the components that got changed after the specified date accross all the publications.

Is there anyway to search the modified components in a particular publication using SearchQueryData ?

2

You can do it, but there's a catch. Items can be shared, or localized in the publication you are interested in, so apart from setting publication you also need to set the BlueprintStatus. So:

filter.BlueprintStatus = SearchBlueprintStatus.Unspecified; // or anything else
filter.FromRepository = new LinkToPublicationData{ IdRef = pubId };
| improve this answer | |
  • Is there anyway to get the revision history of categories, keywords, structure groups and folders – Hakimuddin Apr 1 '15 at 9:35
  • No, these are not versioned items, so you can only get the last changed time and revisor – Andrey Marchuk Apr 1 '15 at 9:37
  • I checked but it doesnot show the version history of folders, SG, categories and keywords...it only gives the version history for components CT,PT, pages,TBB. – Hakimuddin Apr 1 '15 at 9:39
  • Even in tridion there if you right click the Categories there is no option to check the version history – Hakimuddin Apr 1 '15 at 9:40
  • Please ask a separate question as we are polluting this one – Andrey Marchuk Apr 1 '15 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.