As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
hi i'm trying to save an entity in a collection which is call test, but it's not saving the information. i know that the information is being post but not saved i don't know why please help
var promise = Kinvey.init({
appKey : 'key given by kinvey,
appSecret : key given by kinvey,
}).then(function(activeUser) {
// Auto-generate the active user if not defined.
if(null === activeUser) {
return Kinvey.User.create();
}
}).then(null, function(error) {
alert(error.description);
});
var promise = Kinvey.DataStore.save('test', {
_id : '2',
test : '2'
},{
success: function(response) {
alert("test");
}
});
1 Comment
M
Mark
said
almost 10 years ago
If you attach an error callback to the save operation, you can see the actual error.
My guess is that you’d have to move the save expression *inside* the .then handlers when calling `Kinvey.init`.
Astrid
var promise = Kinvey.init({
appKey : 'key given by kinvey,
appSecret : key given by kinvey,
}).then(function(activeUser) {
// Auto-generate the active user if not defined.
if(null === activeUser) {
return Kinvey.User.create();
}
}).then(null, function(error) {
alert(error.description);
});
var promise = Kinvey.DataStore.save('test', {
_id : '2',
test : '2'
},{
success: function(response) {
alert("test");
}
});