Remove a record from a store

Hi,
I have a problem when I remove a record from a store. After a call to save(), the record is still in the store. A second call to save() send a second "remove record" to the server. I would have access to store.removed to remove definitively the record from the store.

It seems likely to me that the server's response to the Delete request is not appropriate, such that the client-side Store is not removing the "deleted" record.

If you look at the implementation of Store.save() you will see that it fires all three kinds of requests: "C"reate, "U"pdate and "D"elete. Each of those has a corresponding success-callback. Since you see "D"elete requests going out, you know that the Store understands your request to delete the records. But it's not accepting the host's response. Therefore it is not removing the records from itself ... quite rightly, I might add.

The first thing to check, of course, is that the host's response is "successful." Then follow the request through "Store.execute" and the callback-functions that are established in your case.

It's not a pleasant experience, this kind of troubleshooting, but you'll do it soon enough anyway. Fortunately, you only have to do it once.