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

Why Enroll in a Salesforce Administrator Course? Key Benefits for Your Career Advancement

Blog in

  In today's competitive digital landscape, organizations rely heavily on customer relationship management (CRM) systems to streamline their operations and build stronger customer relationships. As…

Popular Salesforce Videos