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.
Have you confirmed that all parameters values present in your users collection? I am able to get all parameters using the following code snippet in a custom endpoint:
var json2csv = modules.json2csv;
var logger = modules.logger;
var requestContext = modules.requestContext;
var myIncomingStringId = requestContext.getAuthenticatedUserId();
logger.info("Logged in user is " + myIncomingStringId);
var collectionAccess = modules.collectionAccess;
collectionAccess.collection('user').find({_id: modules.collectionAccess.objectID(myIncomingStringId)}, function (err, userColl) {
if (err) {
logger.error('Query failed: '+ err);
} else {
logger.info('Query success: '+ JSON.stringify(userColl));
}
response.complete(200);
});
Hope this helps!
Thanks,
Pranav
1 Comment
P
Pranav J
said
over 3 years ago
Answer
Hi Wood,
Have you confirmed that all parameters values present in your users collection? I am able to get all parameters using the following code snippet in a custom endpoint:
var json2csv = modules.json2csv;
var logger = modules.logger;
var requestContext = modules.requestContext;
var myIncomingStringId = requestContext.getAuthenticatedUserId();
logger.info("Logged in user is " + myIncomingStringId);
var collectionAccess = modules.collectionAccess;
collectionAccess.collection('user').find({_id: modules.collectionAccess.objectID(myIncomingStringId)}, function (err, userColl) {
if (err) {
logger.error('Query failed: '+ err);
} else {
logger.info('Query success: '+ JSON.stringify(userColl));
}
response.complete(200);
});
Wood Wayfarer
Hi
I created custom user class
class CustomUser: User {
var first_name: String?
var last_name: String?
var libraryName: String?
Could you please tell me how can i get parameter last_name from User collection in Business Logic?
when I found required user , BL returns
{"_id":"5dadc4e8dfaae7010062dccb","_acl":{"creator":"kid_Bym8FF-A7"},"_kmd":{"ect":"2019-10-21T14:47:04.890Z","lmt":"2019-10-21T14:47:04.890Z"}}
Hi Wood,
Have you confirmed that all parameters values present in your users collection? I am able to get all parameters using the following code snippet in a custom endpoint:
Hope this helps!
Thanks,
Pranav
Pranav J
Hi Wood,
Have you confirmed that all parameters values present in your users collection? I am able to get all parameters using the following code snippet in a custom endpoint:
Hope this helps!
Thanks,
Pranav
-
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