Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ther is not a method in the smartstore sdk. You should do something like this:</p> <pre><code>/** * Upload Queue to Salesforce **/ OfflineQueue.UploadQueue = function(callback,error) { console.log("OfflineQueue.UploadQueue"); if(Util.checkConnection()) { console.log("OfflineQueue.UploadQueue -- app is online"); //DF12 DEMO 23 -- UPLOAD QUEUE TO SFDC navigator.smartstore.soupExists('Queue',function(param){ if(param) { console.log("OfflineQueue.UploadQueue -- Queue exists"); OfflineQueue.LoadRecordsFromQueue(function(records) { if(records.length==0){ console.log("OfflineQueue.UploadQueue -- no records in queue"); callback(); } else { console.log("OfflineQueue.UploadQueue -- iterating records"); for(i in records){ forcetkClient.update('Password__c',records[i].Id,{"Username__c":records[i].Username__c,"Password__c":records[i].Password__c,"Name":records[i].Name,"URL__c":records[i].URL__c},function(){ console.log('QUEUED SFDC Update Success!'); //DF12 DEMO 24 -- ON SUCCESS, REMOVE RECORD FROM QUEUE navigator.smartstore.removeFromSoup('Queue',[records[i]._soupEntryId],function(){ console.log('Removed from Soup'); if(i == records.length-1) { callback(); } },error); },error); } } },error); } else { console.log("Offline queue doesn't exist yet... must not be any records there...") callback(); } },error); } else { console.log("We're offline, can't upload queue... how'd we even get here?") callback(); } } </code></pre> <p>There is a complete sample of smartsore soups and forcetk on github <a href="https://github.com/tomgersic/HazyPassword" rel="nofollow">https://github.com/tomgersic/HazyPassword</a></p> <p>I'm working on a plugin to wrapp this basic flow. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload