Results 1 to 4 of 4

Thread: form.updateRecord dont word

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40
    Answers
    3
    Vote Rating
    1
      0  

    Default Answered: form.updateRecord dont word

    Hello. I have the next work:
    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
                        });
                    },
                })
            }
    but when the update request send the data in the currentCustomer is that is was before changes in the form.

    What I do wrong?

  2. Problem was solved I must add name for each element except Id.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,390
    Answers
    716
    Vote Rating
    498
      0  

    Default

    Perhaps if you switch the order of these 2 lines?:

    Code:
    formPersonalData.updateRecord(currentCustomer);
    currentCustomer = formPersonalData.getRecord();
    Regards,
    Scott.

  4. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40
    Answers
    3
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by scottmartin View Post
    Perhaps if you switch the order of these 2 lines?:
    Not work. In documentation formPersonalData.updateRecord(currentCustomer); - this must update the currentCustomer from form field, but it not work

  5. #4
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40
    Answers
    3
    Vote Rating
    1
      0  

    Default

    Problem was solved I must add name for each element except Id.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •