You need to sign in to do that
Don't have an account?
Storing Data Offline with Salesforce Mobile SDK SmartStore
Hello, I develop en an Android application with the Salesforce Mobile SDK to store datas offline in using smartstore.
I saw the Mobile SDK Workbook but it's not said how store manually datas with smartstore.
Per example, I want when a user populate a form and submit it, store form's informations in the mobile with smartstore and I don't how do it.
In this time, I tried this :
function Track(){ this.Id = null; this.Name = null; this.Price__c = null; this.Album__c = null; this.Album__r = null; } function Album(){ this.Id = null; this.Name = null; } var track = new Track(); track.Id = $j('#idInput').val(); track.Name = $j('#nameInput').val(); track.Price__c = $j('#priceInput').val(); track.Album__c = $j('#albumIdInput').val(); track.Album__r = new Album(); track.Album__r.Id = $j('#albumIdInput').val(); track.Album__r.Name = "A name"; var myTable = []; myTable.push(track); addOfflineTracks(JSON.stringify(myTable), successAdd, errorAdd);
I get an error :
http://nsa33.casimages.com/img/2013/08/12/130812124002327909.png
I guess than I don't give the good datas to store with smartstore because when datas are loaded from a Salesforce controller, a list is given to store and I use a table.
How can I use a list en Javascript please?
Sorry if I use a bad language.
I have an issue for my problem, this my code :
All Answers
The error seems to say that there's something wrong with your Visualforce remoting call. Can you provide your remoting Javascript source and the Apex controller method source?
Also, you may consider posting to the Mobile forum for quesitons about SmartStore.
I have an issue for my problem, this my code :