I want to delete a specific record from soups, can anyone help me to achive this. I tried with the destroy function but it removes the record from both soups and salesforce in online mode and in offline mode it updates the destroy flags in the model.
I just want to delete a record from my device only.
-
Please give us more details. Maybe some code snippets.– Sergej UtkoCommented May 26, 2015 at 12:44
-
1The code snippet could be lengthy to provide but i can say that i was using destroy method to remove the entry from soups. It does work, but the problem is that it removes the record from both salesforce and device. If i use the same method in offline mode it will not remove the record from soup but will update the destroy flag in the model object to remove it later while synching. Please let me if anything more you need.– kalimsayyedCommented May 26, 2015 at 13:24
-
May be usefull to explicitly state that you ONLY want to remove it from the soup, which isn't the same as deleting the record as is. I'm not sure why this is receiving close votes.– Samuel De RyckeCommented May 26, 2015 at 13:52
Add a comment
|
1 Answer
You can remove the specific soup from smartstore using soupId
navigator.smartstore.removeFromSoup(suupName,[soupId],function(data) {
})
Here you can give array of soupId's to remove multiple soups