-
16 Apr 2012 9:51 AM #1
Answered: form.updateRecord dont word
Answered: form.updateRecord dont word
Hello. I have the next work:
but when the update request send the data in the currentCustomer is that is was before changes in the form.Code:formPersonalData = Ext.getCmp('formPersonalData').getForm(); if (formPersonalData.isValid()){ formPersonalData.updateRecord(currentCustomer); currentCustomer = formPersonalData.getRecord(); currentCustomer.save({ success: function(record){ Ext.Mesg.alert('Сообщение', 'Данные сохранены.'); }, failure: function(record){ Ext.MessageBox.show({ title: 'Ошибка', msg: 'Ошибки при сохранении данных. Обратитесь к администратору.', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.ERROR }); }, }) }
What I do wrong?
-
Best Answer Posted by Forn
Problem was solved I must add name for each element except Id.
-
16 Apr 2012 10:45 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Perhaps if you switch the order of these 2 lines?:
Regards,Code:formPersonalData.updateRecord(currentCustomer); currentCustomer = formPersonalData.getRecord();
Scott.
-
16 Apr 2012 11:11 AM #3
-
17 Apr 2012 10:28 AM #4
Problem was solved I must add name for each element except Id.


Reply With Quote
