You need to sign in to do that
Don't have an account?
rahularora
filtering users in apex code(Class) on users license type
Hi,
I have a requirement to filter users on the basis of user's license type.
I am able to access profile license type field in apex explorer but while using the same field in system log or apex class, it throws an error "no such fields on prfile"
kindly help
Will this helps you?
integer u = [select count() from user where profile.UserLicense.Name = 'salesforce' and isactive = true];
I am not able to retrieve the licence type but I could filter it out users by licence type
All Answers
Hi,
Try this:
Will this helps you?
integer u = [select count() from user where profile.UserLicense.Name = 'salesforce' and isactive = true];
I am not able to retrieve the licence type but I could filter it out users by licence type