How do I edit a record?


So, I’ve created a record shown below:

  var newInvoice ='invoiced',{
          invoiceName: this.get('invoiced.invoiceName'),
          invoiceAmount: this.get('invoiced.invoiceAmount')

I would like to have an edit button which will take a new input from the user and edit the record selected. How would I go about doing this?


You need to pull the record from the store, make your changes then commit it back:'invoiced', newInvoice.get('id')).then(function(invoice){
    invoice.set('someProperty', someValue);;