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
chrisCCASchrisCCAS 

Can Someone Please help me out here

I need to Query data from sales force from numerous different parts... Example    from accounts, contacts, etc.   Therefor I need to run different statements each time to do this. (Unless theres another way)

What ive been doing is running numerous different Querys to retrieve the data.

However my problem is, If i query say 10, I will get a select list of information. yet if i query say, 50. I get a different list of information. This is definatly a problem as I am querying from different spots putting it all together. IM getting data from different clients Mixed up.  Like if i queried 10. id get like

Bob, smith, john, frank, susie.etc

while if i did 50 id get like,

Todd, bob, Sarah, Lizzy, Smith

 

It makes no sense, and I was just fiddling around with Sforce Explorere and it does the exact same thing..hellp.

SuperfellSuperfell
Can you explain what you mean by query 10 and query 50 ?
chrisCCASchrisCCAS

sorry about that, Batch Sizes.

SuperfellSuperfell
but in either case as long as you call queryMore until done, you'll get the same data. There's nothing that ensures you'll get the same order each time, regardless of whether the batch size is the same or different.
chrisCCASchrisCCAS

Okay so if thats true, then How can I get data from different secions  (contacts, accounts,case, assets.. etc) and put them into one grid. I was considering they were all the same order,there for i could just run a query for each and throw them all into a grid.

I right now know how to retrieve the data and put it into a grid, my only problem is order. theres no order so theres just information thrown around.

SuperfellSuperfell
You'll have to manage ordering yourself, the best way to do this depends a lot on how much data youre getting, and how youre managing it on the client side.