You need to sign in to do that
Don't have an account?
Riadh M
SmartStore limit storing to 2000 record !!
Hello everyone,
I'm working on a mobile application using Jquery Mobile. My application handles offline mode, for that I use the SmartStore plugin. But I noticied that it is impossible to store more than 2000 records in one Soup. Is that normal ? Anyone else got the same problem ? Is There any trick allowing us to store more than 2000 records in a Soup ?
Thank you guys in advance for any lead.
You are right !
I have finally been able to store more than 2000 records using the function queryMore of the forcetkclient. But still, if I try to get a huge number of records (like 200 000), the system do not respond anymore. Maybe the solution to that is to do it gradually, like fetch only 10 000 records each time.
Thanks for the respond anyway, I will consider the problem solved (because I can store more than 2000 records now).
For anyone interested, I have done the following :
// I declare an array to store my results
var tempArray = [];
// I call the queryMore function. This function will call another function in the calback. This latter function (callbackFunction) contains a queryMore function too, which concats elemetns to the array and calls itself in the callback of the queryMore function
forcetkClient.queryMore(response.nextRecordsUrl, callbackFunction , error);
//This is the callback function
function callbackFunction (response) {
tempArray = tempArray.concat(response.records);
if (response.nextRecordsUrl {
forcetkClient.queryMore(response.nextRecordsUrl, callbackFunction, error);
}
else
// Here store in the soups with upsertSoupEntries
}
All Answers
Do we need to use a Partner WSDL if we want to integrate custom objects in SF to a web application (iOS, Android)? This web application has some data elements that need to be updating the SF Objects, also, some data from the SF objects (including chatter) need to be pushed to the web application (2-way interface).
Any recommendations/suggestions will be greatly appreciated.
Thanks,
You are right !
I have finally been able to store more than 2000 records using the function queryMore of the forcetkclient. But still, if I try to get a huge number of records (like 200 000), the system do not respond anymore. Maybe the solution to that is to do it gradually, like fetch only 10 000 records each time.
Thanks for the respond anyway, I will consider the problem solved (because I can store more than 2000 records now).
For anyone interested, I have done the following :
// I declare an array to store my results
var tempArray = [];
// I call the queryMore function. This function will call another function in the calback. This latter function (callbackFunction) contains a queryMore function too, which concats elemetns to the array and calls itself in the callback of the queryMore function
forcetkClient.queryMore(response.nextRecordsUrl, callbackFunction , error);
//This is the callback function
function callbackFunction (response) {
tempArray = tempArray.concat(response.records);
if (response.nextRecordsUrl {
forcetkClient.queryMore(response.nextRecordsUrl, callbackFunction, error);
}
else
// Here store in the soups with upsertSoupEntries
}
@Kechmus - what issue did you face with a large number of records? I've used Smart Store in an app which has around a million records stored offline and it works pretty well. Perhaps, I can be of some help.