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
Mamatha MasterMamatha Master 

Urgent: taking moretime while getting contacts

Hi,
 
I am facing problem with API if there are more records.
 
I am getting contact using query function as shown below

sforce.QueryResult con=sfc.query ("Select FirstName,LastName,ID,AccountID from Contact");

If there are more records say 1000 the query is taking much time to load, we even predict how much time it will take or it will give results.

I am using the following code to filter the records, its working fine

string cmdText="find {"+Encode(whereClause)+"} in Name fields returning contact(FirstName,LastName,ID,AccountID),account(id,Name)";

sr=sfc.search(cmdText);

 

Can any one help how to overcome this  issue

 

Thanks

Mohan