error 403 when saving object

Based on the javascript SDK:

When I want to update a property of an object, I use the save function as used and described in the code examples. The server however returns an error 403 - error: Cannot persist object. Property ‘objectId’ must be set by the server. Make sure the property is not initialized when saving new object.

This where I pressumed based on the examples that the objectId is mandatory when we try to do an update of an existing object?

Hi Jeroen,

When you update a property of an object, I assume you work with the object returned by the server?

The objectId property is indeed mandatory when you perform an update. This is how the server will know that you’re working with an existing object rather than a new one.

Mark

Hi Mark,

I use a parsed version which I resend. All variables in this version however have the same names as on the backendless backend. (So the object I sent is a 1-to-1 mapping).
When I delete the objectId , the backend accepts it and creates a new object.

Hi Jeroen,

When you update an object on the server, does the objectId property contain the original value assigned by backendless?

Mark

Hi Mark, adapting the element on the backendless server keeps te objectId

Would it be possible for you to capture the request (say in the Network tab in Chrome) and post it here? I’d like to see the URL, headers and the body of the request.

Thanks!
Mark