What are Record Types in Salesforce?

on

|

views

and

comments

Table of Contents

Introduction

Before we talk about what are record types in Salesforce, Let’s talk about what is the business use case where we will be needing the various record types.

Business Use Case: You are working as Salesforce Admin for Xcorp Ltd.  Users who are part of the Sales department want to see the different set of fields on the record detail page & Users in the Marketing department wants to see different fields on the detail page for Lead Object.

Note: – Both department users want to see the different picklist values.

Whenever we need to display the different fields on the record detail page or need to display the different picklist values for the same picklist fields to different processes then we always go with Record Types in Salesforce.

What is Record Type

Record Type is a special type of object which can be related to almost any standard or custom object.

When you create a record type for any object then a new field becomes available and the API name is RecordTypeId.

Problem Statement

Your company is dealing with two types of accounts

  • USA Customers
  • International Customers

And for USA customers the Sales users only want to see the below values for the picklist

  1. Education
  2. Technology
  3. Communications
  4. Consulting
  5. Finance

And for International Customers, want to see the below values for the Industry picklist

  1. Government
  2. Manufacturing
  3. Media
  4. Not For Profit

 

Create Record Types in Salesforce

As described in the problem statement, the end users want to see different picklist values so the solution would be record types.

Create two record types for accounts and the name are given below

  1. USA Customers
  2. International Customers

Follow the below steps to create the record types

  1. Login to Salesforce
  2. Navigate to Setup -> Object Manager
  3. Click on the “Account” from the list.
  4. Select “Record Types” from the left panel
  5. Click the “New” Button
  6. Provide the name
  7. Click Next & Save

Repeat steps 4-7 and then create an International Customer Record Type.

Note: – Please make sure that the record types are active and available for the System Administrator Profile.

Configure Picklist Values

Now, we have set up the record types. The time is to configure the picklist values for Industry.

While you are on the account object page, Select Record Types from the left panel and select “USA Customers“.

It will open the record type detail page, where you will see the list of all picklist values.

Select Edit next to Industry picklist.

Make sure you have selected only the required values mentioned in the requirement.

Repeat the same steps for the International Customers Record Type.

Test the Setup

So far we have seen how to control the picklist values using record types. 

We can also control what fields users see on the record detail page with the help of Page Layouts.

We can create a dedicated page layout for each record type.

Create page Layouts

You have done a fantastic job and your business is very happy with you. Now they are only seeing the picklist values which are required for them.

Requirement:– Users are complaining that they are seeing unnecessary fields on the detail page and those fields are not needed.

Below are the fields required for the USA Customers

  1. Name
  2. Phone
  3. Rating
  4. Industry
  5. Parent Account
  6. Account Record Type
  7. Type
  8. Description
  9. Address

Here is the list of all fields that are required for international Customers

  1. Name
  2. Phone
  3. Industry
  4. Parent Account
  5. Description
  6. Account Record Type
  7. Address
  8. Website

Solution: As a Salesforce Admin, you have identified that page layout is the best solution for this.

Create two-page layouts for USA & International Customers.

Follow the below steps to create the page layout.

  1. Login to Salesforce
  2. Navigate to Setup -> Object Manager
  3. Click on the “Account” from the list.
  4. Select “Page Layouts” from the left panel
  5. Click the “New” Button
  6. Provide the name. For Example, USA Customers
  7. Leave Existing Page Layout as blank
  8. Click Save
  9. You will be taken to the Edit page of Page Layout.
  10. Drag & Drop the required fields into page payout
  11. Click on Save

Please repeat Step 5 to Step 11 for International Customers Page Layout

Page layout Assignment

Perfect you have done an amazing job by creating the page layouts. Now, the time is to make sure that the correct page layout is assigned to the correct record type.

Follow the below steps to assign the page layout to record types

  1. While you are on the account page select “Page layouts” from the left panel
  2. Click the “Page layout Assignment” button.
  3. Then Click on the “Edit Assignment” button.
  4. Next to System Administrator or any other profile under “USA Customer” select all the rows and then select “USA Customers” from “Page Layout To Use” 
  5. Repeat step 5 for the International Customer page layout.
  6. Click Save

Test this out

Congratulations!!!! You have done the setup of page layouts. 

Create the account record with the different record types and notice the change.

Record Type in Salesforce

Amit Singh
Amit Singhhttps://www.pantherschools.com/
Amit Singh aka @sfdcpanther/pantherschools, a Salesforce Technical Architect, Consultant with over 8+ years of experience in Salesforce technology. 21x Certified. Blogger, Speaker, and Instructor. DevSecOps Champion
Share this

Leave a review

Excellent

SUBSCRIBE-US

Book a 1:1 Call

Must-read

How to Utilize Salesforce CLI sf (v2)

The Salesforce CLI is not just a tool; it’s the cornerstone of development on the Salesforce Platform. It’s your go-to for building, testing, deploying, and more. As one of the most important development tools in our ecosystem

Save the day of a Developer with Apex Log Analyzer

Table of Contents What is Apex Log Analyzer? Apex Log Analyzer, a tool designed with Salesforce developers in mind, is here to simplify and accelerate your...

Salesforce PodCast

Introduction Hey Everyone, Welcome to my podcast, the first-ever podcast in India for Salesforce professionals. Achievement We are happy to announce that we have been selected as Top...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here

5/5

Stuck in coding limbo?

Our courses unlock your tech potential