Activity Forums Salesforce® Discussions How to check whether a contact is community user or not in Salesforce?

  • Nikita

    Member
    November 13, 2019 at 5:06 pm

    Hi Deepak,

    You can query for all the contact which are community user as folllowing

    List<Contact> lContacts = [SELECT Id FROM Contact];
    List<User> lUsers = [SELECT Id,Contact.Id,Name,Email FROM User WHERE Profile.Name = 'Customer Commmunity User' AND ContactId IN :lCont];

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos