I am trying to execute a query to fetch full record of user roles from salesforce using SOAP.
But I am getting only 2000 records out of 17,000.
I want to display all roles and its corresponding level as shown below.
RoleID ParentID Level Has subordinate?
1111 2222 1 yes
As i am getting a portion of data , I am not able to iterate and calculate the actual Level.
Please help me on this or suggest me a better method.
API returns the results in chunks / batches. You're supposed to call
queryMore() function to fetch next "page" of results.
There are LOADS of questions about it already, including some language-specicic answers (if you're using the libraries for Ruby for example). And there are even better ones at salesforce.stackexchange.com: