3

We are looking for a tool which will list all Tridion Items such as Publications, Folders, Structure Groups Schemas, Components, Component Templates, Pages, Categories and Keywords modified after particular date (or modified between two dates) using core service.

Please any help appreciated.

2 Answers 2

6

I am not sure why there is a need to create a custom page using the Core Service and in fact of a tool for this purpose (getting a list of all modified items between two dates) when SDL Tridion CME provides this out of the box - Probably you have not shared all the requirement as I am not sure why you want to generate XML for each one of these and save it in a particular location.

If you just want to search for modified items for a date range and saving its XML at a particular location just to list them again for review purpose, you may follow the below approach - Else, please add more details on the requirement.

You can use the Advanced search feature to generate this list as shown in the below screen shot: enter image description here

Further, you can save it as a Virtual Folder by clicking on the Save Search button - Going forward, you can access this Virtual Folder in Tridion to get list of these Items for this specific dates.

Caution: If you happen to use Virtual Folder approach; I hope you are also following the SDL Recommended Maintenance tasks for SDL Tridion and Re-indexing the SDL Tridion Items on a regular basis.

6
  • In our case we are currently using 2011 SP1 at the tcm side there are many projects are going on. We have started the porting items from 2011 to 2013 SP1, but once porting is done still the development team can do changes in the 2011 that need to be ported again to the 2013 so instead of porting all the items planning to create tool which will give the modified items that list will handover to the porting team it will make their life easier
    – k951
    Commented Apr 28, 2015 at 8:43
  • 1
    In that case (Since it will just be a one time user tool at a particular instance) - Why can't you or the Porting team utilizes the Concepts of Virtual Folder or the Advanced search feature? Commented Apr 28, 2015 at 8:54
  • That's fine Pankaj but some times it will be tough to understand the requirements of the higher management so they need a tool. If i want to develop a tool what are the cons and pros for this. If any idea please help me out.
    – k951
    Commented Apr 28, 2015 at 9:59
  • @k951 - I agree with Pankaj in response to your question (and further point above) it would not make sense not to use something that is (a) Out of the box (b) tried and tested (c) Supported (d) Configurable and (e) documented. If there are other " requirements of the higher management" then these should be asked in another question so readers can rise to the challenge of helping to solve that :) Commented Apr 28, 2015 at 10:31
  • Everyone knows SDLC including the higher management and the first step in it is understanding the requirement even if it is tough - I can;t suggest anything unless I am clear about the requirement; if it is the only requirement as you mentioned then there is no need to write a tool but use the out of the box functionality - I would suggest, you should get requirement crystal clear including the future possibilities Commented Apr 28, 2015 at 10:52
0

Here's how I get items in a folder after a specified date. I think you can easily adapt this. it is using core-service API through powershell. I think it could be more efficient using the search API. but I am not concerned about performance, so I just got everything and then looped through to exclude what is not modified after the date.

        $folder = Get-TridionItem -IdOrPath (Get-EncodedWebdavUrl $WebdavUrl)
    #Get-TridionCoreServiceAssembly
    if ($folder -ne $null)
    {

        $filter = New-Object Tridion.ContentManager.CoreService.Client.OrganizationalItemItemsFilterData
        #want full objects
        $filter.BaseColumns = 3

        #want only items of requested type.
        $filter.ItemTypes = $ItemTypes

        #recursive?
        if ($Recursive)
        {
            $filter.Recursive = $true
        }
        else
        {
            $filter.Recursive = $false
        }
        if ($ShowNew)
        {
            $filter.ShowNewItems = $true
        }


    $client = Get-TridionCoreServiceClient
    if ($client -ne $null)
    {
        try
        {
            if ($client.IsExistingObject($folder.Id))
            {
                $items = $client.GetList($folder.Id,$filter)
            }
        }
        finally
        {
            if ($client -ne $null) { $client.Close() | Out-Null }
        }
    }

        $recentItems = @()
        foreach ($item in $items)
        {
            $versionInfo = $item.VersionInfo
            $itemTitle = $item.Title
            if ($ModifiedDate -lt $versionInfo.RevisionDate)
            {
                Write-Verbose -Message "$itemTitle is modified after specified date and is included"
                $recentItems += $item
            }
            else
            {
                Write-Verbose -Message "$itemTitle is modified before specified date and is excluded"
            }
        }
        return $recentItems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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