Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

It is sort of available via the user interface, and sort of available via API calls (after v21), and sort of available via reports - but I want to actually query the object directly and drive functionality based on that. Is there any way to do this?

If not, how can I most effectively create and populate a parallel object that allows me to drive this functionality?

Thanks!

share|improve this question

2 Answers 2

you have to query LoginHistory object. I just tried to execute this from 'Developer Console' and works nicely

system.debug([SELECT ApiType,ApiVersion,Application,Browser,ClientVersion,Id,LoginTime,LoginType,LoginUrl,Platform,SourceIp,Status,UserId FROM LoginHistory limit 12]);
share|improve this answer
    
Thanks! For some reason, querying LoginHistory wasn't working from the Force.com Explorer ... –  John Westenhaver Dec 27 '12 at 4:18
1  
I just tried to execute this from 'Developer Console' and works nicely –  Prafulla Patil Dec 27 '12 at 4:38
1  
You would need to be using API version 21.0 or higher to access the LoginHistory records as it was introduced in the Spring '11 release. –  Daniel Ballinger Dec 27 '12 at 6:44

Go through Login History Object

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.