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.

  • Please give us more details. Maybe some code snippets. – Sergej Utko May 26 '15 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. – kalimsayyad May 26 '15 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 Rycke May 26 '15 at 13:52
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.