I am trying to handle an event after creating a new record in ExtJS repository and saving it on the server. But I have a problem - the event recording is triggered only after the update action. The documentation reads:
@event write Fires if the server returns 200 after the Ext.data.Api.actions CRUD action. The success of the action is defined in the result property ['successProperty'] (NOTE for RESTful stores, a simple 20x response is enough for the destroy and update actions. The βcreateβ action should return 200 with the pk database).
Now I have a response from the server: [{"tid": 5, "action": "CityGrid", "type": "rpc", "method": "create", "result": {"msg": "saved", "data": {}, }}]
I assume that adding the .pk database of the created object to the server response should fix the problem, but I don't know how to do it. I tried this one ... "data": {"Id":my_object.id}, but with no effect.
source
share