Hi simone
Could you try to wrap your code with Promise
Backendless.ServerCode.Persistence.afterCreate('YourTableName', function(req, res) {
return new Promise(function(resolve, reject) {
if (req.error) {
reject(req.error)
} else {
var successCallback = function() {
//do something
resolve(res.result)
}
//do something
}
})
});
Regards, Vlad