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.
Asked
Active
Viewed 974 times
0
-
You can post your code what you have tried and we can convert that or provide a better solution then. – harshal gite Oct 28 '19 at 08:12
-
Did you try with below solution? Is that solve your problem? – Md. Nizam Uddin Mahmud Oct 28 '19 at 13:37
2 Answers
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:
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.
Md. Nizam Uddin Mahmud
- 422
- 3
- 15