Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
I am looking for soql which could fetch me all the license used for all inactive and active users in one shot. similar to displaying company license information in native SFDC environment.
I am working on displaying the license information on VF such that i can have my own custom activation and deactivation of users in organization.
Any light on this is greatly appreciated.
19.5k44 gold badges5151 silver badges9797 bronze badges
asked Jan 19, 2015 at 12:01
8711 silver badge1212 bronze badges
select count(id), profile.usertype, isactive
group by profile.usertype, isactive
order by profile.usertype, isactive
Look here for a breakdown of how to interpret the different user types: What are the possible options for UserType?
answered Jan 19, 2015 at 16:51
select id, name, isactive, profile.userlicense.name from user
Will give you the users and their license type.
6,10922 gold badges3333 silver badges7070 bronze badges
answered Jan 19, 2015 at 20:04
45711 gold badge33 silver badges1111 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged