I have a schema id. based on that schema id i want to retrieve all components modified date (created by that schema).
How to resolve it?
I have a schema id. based on that schema id i want to retrieve all components modified date (created by that schema).
How to resolve it?
You can get a list of components wich uses that schema by this TOM.NET code:
UsingItemsFilter filter = new UsingItemsFilter(schema.Session);
filter.ItemTypes = new List<ItemType> { ItemType.Component };
filter.IncludedVersions = VersionCondition.OnlyLatestVersions;
IEnumerable<IdentifiableObject> components = schema.GetUsingItems(filter);
Then, for each component of the returned list you can retrieve the propertiy "RevisionDate".
Also you cas use Tridion CoreService to obtain the list of components based on that schema:
SearchQueryData query = new SearchQueryData() {
BasedOnSchemas = new BasedOnSchemaData[] {
new BasedOnSchemaData(){
Schema = new LinkToSchemaData(){ IdRef= "{schemaId}" }
}
},
SearchIn = new LinkToIdentifiableObjectData() { IdRef = "{publicationId}" },
ItemTypes = new ItemType[]{ ItemType.Component }
};
XElement xResults = channel.GetSearchResultsXml(query);
This is from this post: How to get all Components based on a Schema and from a particular Publication?
Hope it helps.