You need to sign in to do that
Don't have an account?
In iOS how do you get the nextRecordsURL data?
I have an iOS that connects to sfdc and runs a SOQL query, but more than 2000 results are returned, so I can see the nextRecordsURL in the json data, but then how do I use that hyperlink to get the next set of results? I have tried to use the SFRestRequest with the following code:
SFRestRequest *tempRequest = [[SFRestRequestalloc] init];
[tempRequest setPath:strDone]; // this is the URL returned in nextRecordsUrl
[tempRequest setMethod:SFRestMethodGET];
[[SFRestAPI sharedInstance] send:tempRequest delegate:self];
I get the following error message:
Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0xf0c3fb0 {message=The requested resource does not exist, errorCode=NOT_FOUND}
I have tried appending the auth token to url and that does not work either.
Thanks.
Thanks for reporting this issue. After a little investigation, we've added a bug for this here:
https://github.com/forcedotcom/SalesforceMobileSDK-iOS/issues/32
A fix should be forthcoming soon.
Best,
Todd
[NSStringstringWithFormat:@"/v23.0/query/%@", [[[jsonResponse valueForKey:@"nextRecordsUrl"] componentsSeparatedByString:@"/"] lastObject]] however i would reccomend you to get the api version from the SFRestApi property instead of hardcoding it.
This should be fixed/updated on the SalesforceMobileSDK-iOS repo now.
Thanks,
Kevin
Awesome thank you!!!