How to query users with Salesforce User License?

Using SOQL:

SELECT Id, Name FROM User WHERE Profile.UserLicense.Name = 'Salesforce'

Using Report:

1. Go to Setup --> Customize --> Users --> Fields --> Create New Field.

2. Select "Formula" as the data type and "Text" as return type.

3. Use "Profile.UserLicense.Name" in the formula editor.

4. Save the formula field.

5. Use the formula field in the report.

Cheers!!!

No comments:

Post a Comment