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:

Map orderObject = {
  "orderAmount": 1200,
  "orderName": "Sample Order"
};

Backendless.data.of("Order").save(orderObject).then((savedOrder) {
  print("Object has been saved in the database - ${savedOrder['objectId']}");
});
import 'package:backendless_sdk/backendless_sdk.dart';

@reflector
class Order {
  int orderAmount;
  String orderName;
  String objectId;
}


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

Backendless.data.withClass<Order>().save(order).then((savedOrder) {
  print("Object has been saved in the database - ${savedOrder.objectId}");
});