2

Lets say we have 2 contenttypes:

  1. LanguageItem (inherits from item)
  2. News (inherits from LanguageItem)

I have a list with contenttype set to "News", including some items.

Is it possible to create a CAML Query, by contenttype, to get all items with contenttype "LanguageItem" (thus also with all "News"-items)

1 Answer 1

5

Inherited content type IDs starts with parent content type id. You can use <Contains> condition with CAML and filter on ContentTypeId column pass the value of "LanguageItem" ctype ID. You can also use BeginsWith

<BeginsWith><FieldRef Name="ContentTypeId"/><Value Type="Text">ctypeID</Value></BeginsWith>

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.