4

I am trying to get whereUsed data of a component/page template ? It throws the below fault exception.

"Cannot create an abstract class."

       WhereUsedFilterData usingItemsFilterData = new WhereUsedFilterData ();           
       return  client.GetListXml(tcmID, usingItemsFilterData);

Is there any other alternative way to get the whereUsed or Is there any problem in my code ?

Thanks

1 Answer 1

9

Rather than using the base class WhereUsedFilterData you should use on of the derived classes UsedItemsFilterData or UsingItemsFilterData like below:

//Get all items using the given TCM ID
UsingItemsFilterData usingItemsFilterData = new UsingItemsFilterData();
return client.GetListXml(tcmID, usingItemsFilterData);

//Get all items used by the given TCM ID
UsedItemsFilterData usedItemsFilterData = new UsedItemsFilterData();
return client.GetListXml(tcmID, usedItemsFilterData);

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.