You need to sign in to do that
Don't have an account?
Ajith Anand2
SOQL Query for querying Loginhistory
Hi,
I have a LIST of userIds from the User object. In the Loginhistory object, userId is the reference field.
The LoginHistory maintains the login activities for all the users. Hence there are multiple record entries for each user.
How can I query and build a new LIST of the most recent LoginTime (one record per UserId) for each UserId, ensuring that the salesforce best practices are respected?
Any help would be greately appreciated.
Thanks,
Ajith
I have a LIST of userIds from the User object. In the Loginhistory object, userId is the reference field.
The LoginHistory maintains the login activities for all the users. Hence there are multiple record entries for each user.
How can I query and build a new LIST of the most recent LoginTime (one record per UserId) for each UserId, ensuring that the salesforce best practices are respected?
Any help would be greately appreciated.
Thanks,
Ajith
All Answers
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_loginhistory.htm
Simple query showing UserId & LoginTime for each user
Query showing logins only after a specified date and time
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help