function ws_create(data,version,method,authenticateResult) {
// Test if it is a remoteSearch call
if (method == "search") {
// Create the FoundSet from the data that is send over from the mobile client
var fs = plugins.mobileservice.createRemoteSearchFoundSet(data);
// This FoundSet is in find mode, more stuff could be added to it if you want to filter even more. Then call search()
fs.search();
// Create the OfflineDataDescription that will be returned for this remoteSearch
var retval = plugins.mobileservice.createOfflineDataDescription('data_');
retval.addFoundSet(fs);
return retval;
}
} |