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.
How to get user from custom endpoint to push him a notification
M
Mike Filippov
started a topic
about 10 years ago
Hello!
My users have private (private read, private write) access to collection (events). I am using custom endpoint to insert new event for user (using its ID as record creator) and I want to push notification for this user.
modules.push.senMessage(user, 'NEW\_EVENT') requeres a user. Where should I get it?
I've tried modules.collectionAccess.collection('user').findOne({"\_id", "some user id"}, function (err, user)){} with no luck (no error, user = {})
_id is stored as a BSON object, you must convert the string "some user id" before querying it: {"_id", modules.collectionAccess.objectID("some user id")}
Mike Filippov
My users have private (private read, private write) access to collection (events). I am using custom endpoint to insert new event for user (using its ID as record creator) and I want to push notification for this user.
modules.push.senMessage(user, 'NEW\_EVENT') requeres a user. Where should I get it?
I've tried modules.collectionAccess.collection('user').findOne({"\_id", "some user id"}, function (err, user)){} with no luck (no error, user = {})