Duplicate records getting created

I don’t know why, but my app is randomly creating duplicate table records as a result of a single call to Save Object in Backendless. Look at the timestamps in the ‘created’ column, they’re all the exact same, as a result of one single Save call. I should only have one record.

The issue isn’t happening all the time, I’m not able to figure out what causes it. My logic actually checks for a preexisting record before creating a new one, which works, except for these random duplicate creations.

I don’t know if this helps, but my function is called from custom code because of an integration requirement with an iframe.

This is the Save call in the function, which is very straightforward and should result in a single record being created:


I recommend adding more logging to see where the logic is failing. If there are two records created, the logic must be executing twice.


Thanks. I’ll add logging for additional study, however the logic I’m showing is on the browser/client side, so it would make no sense at all for the 4 records (which is a lot) I’m showing above to have the exact same timestamp (down to the second) in a case where my logic is called multiple times. With client-server trips, I would see different timestamps. The single Save call somehow created 4 records here and other times it creates 2 (duplicates with exact same timestamp as well) from what I can see in my table.

Let’s see what the logging shows. Also, check the Network tab in the browser to confirm there is only one call to save the object. Additionally, do you have any Cloud Code handlers that could also be (re)saving the object?

Thanks, I’ll trace all of this. No Cloud Code handlers are in place.