Activity Forums Salesforce® Discussions How do I count records in Salesforce?

  • How do I count records in Salesforce?

    Posted by Ayush on July 23, 2020 at 11:46 am

    <div jsname="ARU61" aria-controls="_L3gZX5-vI9nBz7sPyf2ioAQ4" aria-expanded="true" id="_L3gZX5-vI9nBz7sPyf2ioAQ5" jsslot="" role="button" tabindex="0" jsaction="CQwlrf;fastbutton:CQwlrf"><div jsname="xXq91c" data-kt="KjCM14LDo-SB8vYB-a_en5DdkPhu7LXZ8__JhZTCAcCHur-tr6uitQH8t9aY08mEp0I" data-hveid="CAEQDA" data-ved="2ahUKEwjfgpCRpuPqAhXZ4HMBHcm-CEQQuk4oAHoECAEQDA">How do I count records in Salesforce?

    <div jsname="dcydfb" aria-labelledby="_L3gZX5-vI9nBz7sPyf2ioAQ5" id="_L3gZX5-vI9nBz7sPyf2ioAQ4" jsslot="" jsaction="CQwlrf;fastbutton:CQwlrf">
    <div jsname="oQYOj" data-hveid="CAEQDQ" data-ved="2ahUKEwjfgpCRpuPqAhXZ4HMBHcm-CEQQu04oAXoECAEQDQ"><div data-md="61">
    </div></div></div></div></div>

    Kirandeep replied 4 years, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Anuj

    Member
    July 23, 2020 at 1:01 pm

    Click Record Count to toggle between showing and hiding the count. ). Click the arrow, and select Remove Column. To display record count again, click the arrow in the block header and select Record Count.

  • Kirandeep

    Member
    July 23, 2020 at 1:30 pm

    Hi Ayush ,
    We can use the following approach

    List myContact = new List();
    myContact = [Select id, Email from contact where Mailingcity ='Alpharetta'];
    system.debug('Size of List'+myContact.size());

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos