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
rps2002rps2002 

Fastest way to get objects: query(), search(), or retrieve()?

Which method is the fastest to retrieve an account with that account's ID, using query, search, or retrieve?  What is the difference between the three options?

simhasimha

i want to reterive all valuesof a particular field to the .net.....

 

WebService static Lead[] getfulldetails()
     {
     Lead[] f =[SELECT State from Lead ];
     return f;
     }

 

is it right?plz reply me
SuperfellSuperfell

Why would you write an apex wrapper around a single simple SOQL query, just use the query API call directly.

 

If you're trying to get the set of available picklist values for a picklist field, then use the describeSObject call.