December 27, 2020

How to query Internal, Community/Portal and Community/Portal Users in Salesforce using SOQL?

Internal Users:
SELECT Id, Name, IsActive, Profile.Name FROM User WHERE ProfileId IN ( SELECT Id FROM Profile WHERE UserType = 'Standard' )


Customer Community/Portal Users:
SELECT Id, Name, IsActive, Profile.Name FROM User WHERE ProfileId IN ( SELECT Id FROM Profile WHERE UserType = 'CSPLitePortal' )

 
Partner Community/Portal Users:
SELECT Id, Name, IsActive, Profile.Name FROM User WHERE ProfileId IN ( SELECT Id FROM Profile WHERE UserType = 'PowerPartner' )
 

No comments:

Post a Comment