Introduction
Salesforce CRM can give many data type fields to get a difference of information from users and store it in our org. This includes information such as name, date of birth, birth time, work location, email, mobile number, etc.…
In this article, I am going to explain the “Picklist” and “Picklist (Multi-Select)” data type fields in the Salesforce lightning platform.
Picklist
The picklist data type field contains much of the data available on the list. But users can select any one of the data from the list. For example, (Gender)
Picklist (Multi-select)
The picklist (Multi-Select) data type field contains many of the data available on the list. This picklist can allow users to select multiple data from the list.
By reading this article, you will learn about how to create a Picklist and Picklist multi-select in Salesforce custom objects.
Prerequisites
-
Before starting this process, you must sign up on the Salesforce Trailhead lightning platform. Click here to
sign up
Creating A Picklist Data Type Field
Step 1
Login to trailhead and Launch “trailhead playground” or “Developer Edition”
Step 2
Click the “Gear” icon and then click the “Setup” option.
Step 3
On the setup page, click the “Object Manager” at the top of the page.
Step 4
Read my previous article, how to create a custom object in the salesforce lightning platform.
In the object manager page, scroll down and click the created our custom object name from the object list.
Step 5
In our created custom object page, click the “Fields & Relationship” option from the left side pane.
Step 6
Next, in fields and relationship pages our predefined fields are listed. Now we are creating a new picklist field from the data type by clicking the “New” button.
Step 7
On the next page, many data types are listed on the page. Select the “Picklist” data type radio button and then click the “Next” button.
Step 8
In the details page, enter all the required fields.
-
Give the field name
-
Select the “Enter the values, with each value separated by a newline” radio button.
-
Give the values to picklist and then select the checkbox when you require it.
-
Check If all fields can be filled, finally click the “Next” button.
Step 9
Next, in the field level security page check if the “Visible” checkbox is checked and then click the “Next” button.
Step 10
In addition to the layout page, check the checkbox to select our custom object name. Click the “Save and New” button to redirect for creating a “picklist multi-select” data type field.
We have successfully created a picklist data type field; Next, we are creating a picklist multi-select field.
Creating Picklist (Multi-select) Data Type Field
We are already creating a new field data type page.
Step 1
Select the “Picklist (Multi-Select)” radio button and then click the “Next” button.
Step 2
In the details page, enter all the required fields, follow previous picklist creating (step 8) and click the “Next” button.
Step 3
Next, in the field level security page, check if the “Visible” checkbox is checked,then click the “Next” button.
Step 4
In “Add to the layout page”, check the checkbox to select our custom object name. Click the “Save” button.
We automatically forwarded to fields and relationship pages, on the page can show our created fields name.
We have successfully created both picklist and picklist multi-select data type fields in Salesforce.
Let`s time to test the created fields.
Test Our Created Data Type Field
Step 1
Click the “App launcher” icon at the top left corner on the page and then click the “View all” option.
Step 2
App launcher pop-up window will be opened, search our created object name in the search box, then click the object name.
Step 3
Our object page will be opened, click the “New” button.
Step 4
In the pop-up window, our created picklist and picklist multi-select fields are displayed and then select the data from both fields.
Click the “Save” button to save the data in our salesforce org.
Summary
Our data can be selected from the created picklist field and successfully saved inside our Salesforce org.