I have a Schema, it has a component link field. Whenever I insert a component , unable to find its reference in getContentSection method. I have Validation on the Save/SaveClose command

if (item) {
        $evt.removeEventHandler(item, "load", MyFunction);
        if (item.getItemType() == $const.ItemType.COMPONENT) {
            if (item.getSchema().getInfo().Title == "TestSchema") {
            $evt.addEventHandler(item, "load", MyFunction);

  • Is it an optional field? In XML, optional fields with no values will not appear.
    – Nuno Linhares
    Commented Mar 2, 2017 at 12:37
  • It has values, but unable to get the updated details. Is there a way of getting changes in component through SourceTab content
    – Kumar_diru
    Commented Mar 2, 2017 at 13:29

2 Answers 2


To retrieve the contents of any type of container in the Content Manager you can use the GetListItems() method, which returns a DOM document, or the GetItems() method which returns a Collection of objects.

TOM.NET classes that use the GetListItems() and GetItems() methods The following TOM.NET classes use the GetListItems() and GetItems() methods to filter lists of items contained in this type of container:

  • Repository ( Tridion.ContentManager.ContentManagement.Repository)
  • Publication (Tridion.ContentManager.CommunicationManagement.Publication)
  • Organizational Item (Tridion.ContentManager.ContentManagement.OrganizationalItem), the parent class of the following four classes
  • Category (Tridion.ContentManager.ContentManagement.Category)
  • Folder ( Tridion.ContentManager.ContentManagement.Folder)
  • Virtual Folder ( Tridion.ContentManager.ContentManagement.VirtualFolder)
  • Structure Group ( Tridion.ContentManager.CommunicationManagement.StructureGroup)

Parameters and return values

Depending on the item type, both the GetListItems() and GetItems() methods take a parameter of either class RepositoryItemsFilter or OrganizationalItemItemsFilter, that lets you specify how the results of the method call are to be filtered:

  • In a GetListItems() call, you can restrict the amount of information that is returned for each item (for example, only the ID and title of each item)
  • In both methods, you can restrict which items are returned from the total set of items contained in the container (for example, only items that are Components)

The return value of each method is different:

  • A call to GetListItems() returns an XML document that consists of one tcm:ListItems element containing zero or more tcm:Items elements.
  • A call to GetItems() returns an IEnumerable of those objects in the container that match the filter criteria.

Please try this code.

var item = this.getItem();
var modifiedDate = item.getLastModifiedDate() || item.getStaticLastModifiedDate();
  • This may be correct, but Stack Exchange automatically flags a three-line answer as being of low quality. I suppose they have a point; I'm sure if you added some explanation it would be a better answer. Commented Mar 2, 2017 at 18:41
  • Hi Rao, I'm looking for changes done in component not modified date
    – Kumar_diru
    Commented Mar 3, 2017 at 4:47
  • please share full source code. after update code changes. you clear the browser cache and history?. Commented Mar 3, 2017 at 5:34
  • Yes I cleared cache and History, and tried in incogntio window too, above is the key code snippet
    – Kumar_diru
    Commented Mar 3, 2017 at 10:36

Below Snippet gives me changes in Component on component View

var itemDisplayTest=$display.getItem();

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.