Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to get the schema's where used list of page templates, schemas etc.,provided with schema ID? Please help on this?

share|improve this question
up vote 6 down vote accepted

CoreService:

 var list = ClientAdmin.GetList("tcm:1-1-8", new UsingItemsFilterData());
 var listXml = ClientAdmin.GetListXml("tcm:1-1-8", new UsingItemsFilterData());

Tom.NET:

schema.GetListUsingItems();
share|improve this answer
    
Thanks a lot.. Its working – Bhavya Mar 9 at 10:56
    
Could you please tell me how to get that 'Where used' list's publication names? – Bhavya Mar 9 at 11:29
    
I have updated my answer – Stanislav Maryenko Mar 9 at 11:55
    
It is throwing an error for me like "LocationInfo" cannot be resolved or is not a field. Its the same with "item" – Bhavya Mar 9 at 12:13
    
That is probably because your list is empty. Can you first check this? – Stanislav Maryenko Mar 9 at 14:18

For this scenario, you can try the following using core service as there is no built in methods for this:

    UsingItemsFilterData filterCriteria = new UsingItemsFilterData();
    filterCriteria.BaseColumns = ListBaseColumns.Id;
    filterCriteria.IncludeLocalCopies = true;
    var resultList =CoreServiceClient.GetList("SchemaURI", filterCriteria);

If you don't want to use or have core service the same can be achieved using TOM.Net API, there is a method on IdentifiableObject called HasUsingItems() which will give you the details also. Check this link once !!

You can have a look in this link which will give you ideas on how to use core service more effectively for similar kind of scenarios.

Let me know if this helps !!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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