top of page
Search

How to Count Records in Salesforce? Detailed Guide for Newcomers

Updated: Jan 6


How to Count Records in Salesforce

Have you ever felt lost in the sea of data in Salesforce? Or

Don’t you know how to count records in Salesforce? Don't worry, you're not alone!


Using Salesforce can be a little challenging, especially when it’s about organizing and counting your data. However, it's complicated only when you are not well-informed or knowledgeable about Salesforce. But fear not - in this blog, we're here to break it down for you.


This article will explore the ins and outs of Salesforce records in a way that's easy to grasp. Also, we’ll share how to count records in Salesforce with practical tips and tricks. So, let’s begin!


What are Records in Salesforce?

Salesforce Records


















In Salesforce, records are the building blocks of information within the platform. They represent individual pieces of data or entries, each associated with a specific object. In simpler terms, if Salesforce were a digital filing cabinet, records would be the files neatly organized within it.


These records can range from customer details and sales opportunities to support cases and any other data your organization tracks. Each type of information is organized into its object, such as an Account, Contact, Opportunity, or Custom Object, and each entry within these objects is a record.


What are Records Types in Salesforce?

What are Records Types in Salesforce










Record Types in Salesforce often face confusion and mishandling. They can provide numerous advantages, but sometimes people misuse them, which leads to assumptions about their capabilities. Also, some users may attempt to use them excessively, even when nonessential.


So, what are Salesforce records types in actuality?


Salesforce Record Types categorize numerous records of a particular type within an object. They are applicable to both standard and custom objects and let you maintain fields, required fields, a different page layout, and picklist values.


They should be employed for records sharing the identical concept but must be different in execution.


The proper usage of Salesforce record types enhances your data quality, reduces manual effort, and simplifies operations. It ensures that end users can concentrate on their primary tasks with ease.


What is Meant by Count Records in Salesforce?


Count records in Salesforce refers to determining the number of individual data entries within a specific object. In Salesforce, a "record" typically represents a unit of information, and record count is a fundamental operation to understand the volume and distribution of data.


For example, it helps you count how many leads are in a particular status, how many opportunities are associated with a specific account, or the total number of records that meet specific criteria in a custom object.


Besides, Salesforce provides various tools and methods, such as reports, SOQL queries, list views, and code (Apex), to facilitate count records based on different parameters and conditions.


How to Count Records in Salesforce?


Counting records in Salesforce can be achieved through various methods. Let’s have a look below:


Using Reports:

Go to the "Reports" tab.

Make a new report or go for an existing one.

Apply filters to specify the data you want to count.

Add a "Record Count" to your report to display the total number of records.


List Views:

Go to the “object” tab containing the records you want to count.

Create a list view and apply filters if necessary.

Use the list view's summary feature to show the total record count.


SOQL Queries:

If you're familiar with Salesforce Object Query Language (SOQL), you can write a query to count records.

Use a query like ‘SELECT COUNT() FROM ObjectName WHERE’ conditions to get the count for specific records.


Roll-Up Summary Fields:

For objects in a master-detail relationship, you can use roll-up summary fields to count related child records on the master record.


Code (Apex):

Advanced users can write Apex code (triggers or classes) to count records based on specific criteria.


So, choose any of the above methods that suit your needs and expertise.


Hide or Show the Record Count in Salesforce for a Block


As a default setting, the report builder and the run reports page display the record count for each block. However, you have the option to hide or show each block’s record count or the number of records in a joined report.


Below, we’ve described how to hide or display record counts for a block for both the Salesforce classic and lightning experience.


Hide or Show Record Count in Salesforce Lightning Experience


In Lightning Experience, when you create joined reports, the count record displays automatically. You can't hide this count record unless you summarize another field, such as 'Amount' in the report. Once you've added a summary, select the Row Count option to hide the count record. Now, click it again to display it back.


Remember, if you hide the count record and remove every summary from the report, the record count displays automatically.


Hide or Show Record Count in Salesforce Classic


You have two options to hide or show the record count in Salesforce Classic:

  1. Select the downward arrow icon available in the block header to display the block menu. The check mark next to the "Record Count" menu item indicates that the record count is visible for the block. To switch between displaying and hiding the count, click "Record Count."

  2. If you’ve hidden the report details already, move the cursor over the "Record Count" column. Now, click on the downward arrow icon and choose "Remove Column" to hide it. To bring it back, click again the downward arrow icon available in the block header, then select "Record Count."

REQUIRED EDITIONS AND USER PERMISSIONS

  • Available in Salesforce Classic and Lightning both.

  • Available in Performance, Enterprise, Unlimited, as well as Developer Editions.

  • Available in Enhanced and Legacy Folder Sharing:

To edit, create, or delete reports:

Legacy Folder Sharing: “Create and Customize Reports AND Report Builder”

Enhanced Folder Sharing: “Create and Customize Reports AND Report Builder”


Wrap Up


We hope this blog has answered all your questions about the Salesforce count record. Knowing the Salesforce record count helps you polish your skills and makes your Salesforce journey a little easier because proficiency in counting records not only simplifies your data but also opens doors to a more efficient and certified Salesforce experience.



bottom of page