Welcome
Login
Sign up
Home
Solutions
Forums
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
Kinvey Forums
Business Logic
Updating user object in Business logic
B
Borna Beaković
started a topic
over 7 years ago
Hi all, please tell me what am I doing wrong.
I want to save/update variable "currentJobs" on user object in Business logic, but with this code isn't happening.
user.save(currentJobs, {
success: function(model, response, options) {
logger.info(response);
}
});
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
B
Borna Beaković
said
over 7 years ago
I can't find one example of Business logic save/update methods just fetch. Is it even possible?
M
Michael
said
over 7 years ago
To save an entity in Business Logic, you need to execute the collectionAccess.save method as follows:
modules.collectionAccess.collection('user').save(entity, function(err, result) {
if (err) {
logger.info(err);
} else {
logger.info(result);
}
});
Login
or
Signup
to post a comment
More topics in
Business Logic
How do I access query string values for GET and DELETE requests?
Basic Authentication in Business Logic
How do I cascade delete entities from related collections?
All BL failing with Violation Error
How do I send push notifications?
Whenever I try to query by _id, I get zero results
receiving SOCKETTIMEDOUT when requesting external http response
Unique Constraints on a collection column?
Need some help with grouping
Accessing Endpoint from Collection Hook
See all 342 topics
Borna Beaković
I want to save/update variable "currentJobs" on user object in Business logic, but with this code isn't happening.
user.save(currentJobs, {
success: function(model, response, options) {
logger.info(response);
}
});