function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VikasVikas 

Can anybody tell me the better way to write query - select ...

Hi,

I need to execute a Query like

Select name from account where id = '00100000002yluK' or id = '00100000002yluK' or id = '001000000038c5S' ....

I normally have about 100 to 150 ids to be written in the query above.

Can anybody tell me the better way to write this query?

Thanks,

ScotScot

Vikas,

I'd suggest using the retrieve call rather than the query.

It would be something like:
   sObjResult = sfdc.retrieve("name, type","Account",idlist)

where idlist is an array of ids.

Scot