Skip to content

Triggering Update Event

To trigger an event, update an existing Order object in the Backendless database. This can be done with any Backendless SDK (Android, iOS, JS, .NET), REST API or Backendless Console:

const orderObject = {} // retrieve an existing object

// update a property in the object
orderObject.orderAmount = 1200;

// now save the updated object
Backendless.Data.of( 'Order' ).save( orderObject )
  .then( updatedOrder => console.log( 'Object has been updated in the database - ', updatedOrder.objectId ))
  .catch( error => console.log( 'Server reported an error', error ))
function Order() {
  this.orderAmount = 0;
  this.orderName = "";
}

const orderObject = {} // retrieve an existing object

// update a property in the object
orderObject.orderAmount = 1200;

// now save the updated object
Backendless.Data.of( Order ).save( orderObject )
  .then( updatedOrder => console.log( 'Object has been updated in the database - ', updatedOrder.objectId ))
  .catch( error => console.log( 'Server reported an error', error ))