See controller code below.

Goal:
1. Server saves some stuff in the database using a store and grid. (simple)
2. A form is attached to the grid for edit of a row, and a button for adding a new record.
3. The json WebService also generates some data in it's response (id and other fields) that should be updated in the store and shown in the grid on every sync.

Working:
Grid is displayed, form is opened clean using a button, fields are filled, form is saved. store.add() is used to create the record, Db returns sent values, also the generated fields, and all is displayed correctly in the grid.

Not working:
When form is loaded for existing record, values are updated, record.set() is used after which DB is updated normally, json returned the same as in the store.add situation.
The grid VIEW is NOT showing the values returned from the server this time. I want the full store record to be shown in my grid after the sync.

Code:
var form = button.up('form');var fullform = form.getForm();


if (fullform.isValid()){
    var record = form.getRecord(),
        values = form.getValues();


    if (values.id !== ""){
        record.set(values);
    }
    else {
        record = this.getAppNotesList().store.add(values);
    }
    
    this.getAppNotesList().store.sync();


    button.up('form').getForm().reset();
    button.up('window').hide();
}
else {
    console.log('Form validation failed.');
}