+ Start a Discussion
GrantMGrantM 

Returning large set a cases with given list if Id's

Hi

I am trying to return a large set of Cases, for which i have an Array of over 5000 Id's

I tried creating an Ugly Query saying something like:

Select Id From Case WHERE Id = '1000000000xAAAAA' or Id = '1000000000xAAAAB' ... and so on for 5000 Id's

But i get the error:

Query cannot exceed 1000 characters.

Whats the best way of doing this?

TIA

ScotScot
Check out the "Retrieve" call. You can pass it an array of ids, and it will return an array of results.  Much easier ... and more efficient ... than the query. Each retrieve an handle up to 2000 ids, so you'll need to do a little iteration.
GrantMGrantM

GREAT!

Thanks alot