2

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.

3
  • Please give us more details. Maybe some code snippets. May 26, 2015 at 12:44
  • 1
    The 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. 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. May 26, 2015 at 13:52

1 Answer 1

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .