Skip to content

Updating Single Object


Future<Map>"TABLE-NAME").save(Map entity);
Future<E><E>().save(E entity);


Argument                Description
TABLE-NAME Name of the table where the object represented by Map will be updated. There must be objectId property in the map. The value of the property identifies the object which will be updated.
E Dart class of the data object to update.
entity Dart object to persist, must be of type E or Map (depending on the method used).

Return Value

The updated object of type E or Map.


void updateContact() {
  // create new contact object first. Then we will update it.
  Map contact = {
    "name": "Jack Daniels",
    "age": 147,
    "phone": "777-777-777",
    "title": "Favorites",
  };"Contact").save(contact).then((savedContact) {
    savedContact["title"] = "Most favorite";
    savedContact["phone"] = "666-666-666";"Contact").save(savedContact).then((response) {
      // Contact object has been updated

Consider the following class:

import 'package:backendless_sdk/backendless_sdk.dart';

class Contact {
  String objectId;
  String name;
  int age;
  String phone;
  String title;
The following code saves a new instance of the Contact class and subsequently updates it:
void updateContact() {
  Contact contact = Contact() = "Jack Daniels"
    ..age = 147 = "777-777-777"
    ..title = "Favorites";<Contact>().save(contact).then((savedContact) {
    // now update the saved object
    savedContact.title = "Most favorite"; = "666-666-666";<Contact>().save(savedContact).then((response) {
      // Contact instance has been updated

Codeless Reference



Argument                Description
table name Name of the data table where a record must be updated.
object An object with properties that match the names of the table columns, these properties must contain new values for update operation. The objectId property and the corresponding value must be also included in the object.
return result Optional parameter. When this box is checked, the operation returns the updated object.

Returns the updated object.

Consider the following record stored in the employees data table:

The example below uses the objectId: "18AE9147-8016-412C-8E55-83B3188E153F" to find the record in the data table and update the value in the contactType column from "Personal" to "Work". To update more values in one query, specify the required number properties/column in the object and the new values.


The result of this operation will look as shown below after the Codeless logic runs:


Moreover, the operation described above has returned the updated object: