+ Start a Discussion

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?


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

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.