Code sample of Updating Single Object is incorrect

The documentation for these two API calls is identical. The latter should demonstrate how to specify which object is to be updated.

// https://backendless.com/docs/js/data_single_object_create.html
Backendless.Data.of( "TABLE-NAME" ).save( { propertyA:"", propertyB:""} )
 .then( function( savedObject ) {
  })
 .catch( function( error ) {
  });


// https://backendless.com/docs/js/data_single_object_update.html
Backendless.Data.of( "TABLE-NAME" ).save( { propertyA:"", propertyB:""} )
 .then( function( savedObject ) {
  })
 .catch( function( error ) {
  });

Hello @Stephen_Peasley

Thank you for pointing us to this issue, we are going to fix it asap.
The internal ticket for reference is BKNDLSS-21379.

Anyways, for objects updating, there must be an “objectId” property

// https://backendless.com/docs/js/data_single_object_update.html
Backendless.Data.of( "TABLE-NAME" ).save( { objectId: "your-object-id" propertyA:"", propertyB:""} )
 .then( function( savedObject ) {
  })
 .catch( function( error ) {
  });

Regards, Vlad

1 Like

Thank you. The Non-blocking API example still needs correcting.

Documentation has been updated.

1 Like