13

I am trying to use GetList to return all the users in a group, as below:

client.GetList(id, new GroupMembersFilterData())

However, I get the exception

{"Unexpected list type: Tridion.ContentManager.Data.Security.GroupMembersFilterData."}

When I use

client.GetListXml(id, new GroupMembersFilterData())

It works! Can anyone explain?

Normally I would probably use Xml anyway, but as I was doing a quick POC I thought I would make it easier and use objects.

1 Answer 1

16

The Content Manager Core Service API Reference Guide shows ICoreService2011.GetList takes two parameters:

  1. TCM URI (or WebDAV URL) as a string
  2. a Tridion.ContentManager.Data.SubjectRelatedListFilterData filter

However, there's a remark that "Currently only OrganizationalItemAncestorsFilterData filter is supported."

The SubjectRelatedListFilterData (abstract) class's inheritance includes:

  • BluePrintChainFilterData
  • CategoryRelatedFilterData
  • ClassifiedItemsFilterData
  • DeletedReferencesFilterData
  • ItemsFilterData
  • KeywordRelatedFilterData
  • OrganizationalItemAncestorsFilterData
  • OrganizationalItemsFilterData
  • PathToCategoryFilterData
  • RepositoryRelatedFilterData
  • TaxonomiesFilterData
  • VersionsFilterData
  • GroupMembersFilterData
  • WhereUsedFilterData

Long list short, use GetListXml() for any filter that isn't an OrganizationalItemAncestorsFilterData for SDL Tridion 2011.

Update: in at least SDL Tridion 2013, you should be able to get back objects on most filters.

ICoreService2012.GetList's updated remark notes that just TaxonomiesOwlFilterData is not supported.

0

Your Answer

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

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