0

I have multiple itemIds, and I like to get the actual items using these itemids in just a single request, is that possible? I know about getListItem() method but that would use only 1 itemid, hence will return only actual item itself. I'm trying to avoid sending multiple requests per item id.

drn
  • 3
  • 2

2 Answers2

0

You can build a caml query with "IN" operator and pass it to the GetItems method

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ee539544(v%3Doffice.15)

Operator has a limitation of 500 items but you can use a workaround with ORs:

CAML query limitation of values in IN operator

mctl87
  • 176
  • 1
  • 5
0

Yes you can filter with multiple IDs. In your filter, query items like this:
ID eq 1 or ID eq 2 or ID eq 3...
But there is a limitation if you have too many IDs then it will not work.


If the answer is helpful, please upvote and mark as accepted.