How to Create Custom Fields in Salesforce

Create Custom Fields in Salesforce and added to the App Tab:

(1) In this blog, we will learn how to create custom fields in Salesforce. After that, we use these fields in the Earthquake Tracker App developed in the previous blog. Learn here: How to Create a New Lightning App in Salesforce.

(2) On the Salesforce setup page click on the Object Manager as shown below.

Object manager tab salesforce

(3) Now Object Manager Set Up page is opened. In the Quick Find box, search for the Custom Object (Earthquake Death Count) that we have created in the previous blog and click on it as shown below. Learn here: How to Create Custom Objects in Salesforce.

Select custom object in salesforce

(4) Our Custom Object (Earthquake Death Count) page is opened. On the left side click on Fields & Relationships as shown below.

Fields & Relationships Salesforce

(5) Now our Fields & Relationships page is opened. On that page, you find some Standard Fields available here. You have to click on the New button to create New Custom Field as shown below.

New custom field salesforce

(6) After that you find the list of data types that are available to choose from when it comes to creating fields. So there are some primary or preliminary data types like text, check box, date, email, phone, time, URL, etc. and then you have some relationship-related data types and also you have something called formula and auto number. In this example, we have the Earthquake Death Count object. What we want to do is we want to track the number of earthquake death cases country-wise. So these would be of the Data Type Number, so I will just go ahead and choose Number and click on Next as shown below.

number field created in Salesforce

(7) After that you have to fill in the necessary information and press the Next button as shown below. Note: Red Mark shows mandatory fields.

Salesforce Number Field 001
Salesforce Number Field 02

(8) In the Field-Level Security for Profile, I tick the Visible checkbox for System Administrator and then click the Next button as shown below.

New custom field visible to system administrator salesforce

(9) Now custom field add to the page layout and then click on the Save Button as shown below.

Custom field add to page layout salesforce

(10) Our field is created i.e. USA Death Cases. Now we have created two more Number Data Type fields i.e. UK Death Cases & UAE Death Cases as shown below. __c represents the custom field. Note: Follow the same step from 5 to 9 to create two more number fields.

custom fields created in salesforce

(11) Now go to the app launcher and search for Earthquake Tracker App and click on it as shown below.

Search for app in app launcher salesforce

(12) Earthquake Tracker App is opened. In the Earthquake Death Counts tab, from the drop-down click on New Earthquake Death Count or click on the Earthquake Death Counts tab and press the New Button as shown below.

custom tab drop down salesforce

OR

new button to add field data in custom tab salesfroce

(13) You find that the Custom fields created in the above steps are now seen in the New Earthquake Death Count pop-up. Fill in the information and then press the Save button as shown below.

custom field in app add information salesforce

(14) Now our first Earthquake Death Count record is created as shown below.

Earthquake record created in salesforce

Create Custom Field Using Formula Data Type:

(1) Formula Data Type is used to calculate the total number of death cases i.e. summation of USA, UK, and UAE Death cases.

(2) Now again go to the Fields & Relationships page and click on the New button to create New Custom Field as shown in step 5 above.

(3) Now you have to select the Formula Data Type and click on the Next button as shown below.

new custom field formula data type salesforce

(4) In the next step, fill the Field Label box, Field Name is automatically generated. In the Formula Return Type, select Number and set Decimal Places to zero, and then press the Next button as shown below.

formula type custom field salesforce

(5) In the Enter formula step, you have to Enter your formula and click Check Syntax to check for errors.

enter formula in salesforce
salesforce enter number

(6) In the Field-Level Security for Profile, I tick the Visible checkbox for System Administrator and then click the Next button as shown below.

System Administrator access to Formula Data Type in Salesforce

(7) Now custom field add to the page layout and then click on the Save Button as shown below.

Formula Data Type Custom Field added to Page Layout Salesforce

(8) New Formula Data Type Field is created as shown below.

Fields and Realtionships Formula Data Type field Salesforce

(9) Now go to the Earthquake Tracker App and click on the Earthquake Death Count Name record created above as shown below.

edit record in salesforce

(10) It shows the Total Earthquake Cases field as shown below.

formula data type field added in record Salesforce

Tutorial Salesforce
Database Management System (DBMS)
Computer Software and Hardware
Client-Server Architecture
Object-Oriented Programming (OOP)
Database Models or Data Models
Microsoft Dynamics 365 Business Central Tutorial– ERP Consultors

Comments (No)

Leave a Reply