Skip to content

Triggering Create Event

To trigger an event, create and save a new instance of the 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 = {
  orderAmount: 1200,
  orderName  : 'Sample Order'
};

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

var orderObject = new Order();
orderObject.orderAmount = 1200;
orderObject.orderName = "Sample order";

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