In this article, we are planning to create five types of fields in salesforce objects. The following are the field names and their data types
We will create five different types of text fields in a Salesforce object.
Prerequisites
-
Before starting this process, you must sign up on the Salesforce Trailhead lightning platform. Click here to
sign up
First, create the text data type fields step by step:
-
Creating A Text Data Type Field
-
Creating A Text Area Data Type Field
-
Creating A Text Area (Long) Data Type Field
-
Creating A Text Data (Rich) Type Field
-
Creating A Text Data (Encrypted) Type Field
Creating A Text 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
Refer to 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 page our predefined fields are listed. Now we are creating a new Text 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 “text” data type radio button and then click the “Next” button.
Step 8
In the details page, enter all the required fields and then click the “Next” button.
Step 9
Leave that field-level security page click the “Next” button. Next, on the Add to layout page click the “Save & New” button.
We successfully created a text data type field in the salesforce object.
Creating A Text Area Data Type Field
Step 1
After clicking the “Save & New” button, we are automatically forwarded to the “New Custom field” page.
Select the “Text Area” data type radio button and then click the “Next” button.
Step 2
Enter the details in all required fields and then click the “Next” button.
Step 3
Click the “Next” button in the field level security page. Next on the Add to layout page click the “Save & New” button.
We successfully created a text area data type field in the Salesforce object.
Creating A Text Area (Long) Data Type Field
Step 1
After clicking the “Save & New” button, we are automatically forwarded to the “New Custom field” page.
Select the “Text Area (Long)” data type radio button and then click the “Next” button
.
Step 2
Enter the details in all required fields and then click the “Next” button.
Step 3
Next, on the field level security page check if the “Visible” checkbox is checked and then click the “Next” button.
Step 4
On the Add to layout page, click the “Save & New” button.
We successfully created a text area (Long) data type field in the salesforce object.
Creating A Text Area (Rich) Data Type Field
Step 1
After clicking the “Save & New” button, we are automatically forwarded to the “New Custom field” page.
Select the “Text Area (Rich)” data type radio button and then click the “Next” button.
Step 2
Enter the details in all required fields and then click the “Next” button.
Step 3
Next, on the field level security page check if the “Visible” checkbox is checked and then click the “Next” button.
Step 4
Next on the Add to layout page, click the “Save & New” button.
We successfully created a text area (Rich) data type field in the salesforce object.
Creating A Text Area (Encrypted) Data Type Field
Step 1
After clicking the “Save & New” button, we are automatically forwarded to the “New Custom field” page.
Select the “Text Area (Rich)” data type radio button and then click the “Next” button.
Step 2
Enter the field name and length for that field.
Next select mask type and mask character for your need, then click the “Next” button.
Step 3
Click the “Next” button on the field level security page. Next on the Add to page layout page click the “Save” button.
We successfully created five different text data type fields in the salesforce object.
Test Our Created Our Text Data Type Fields
Step 1
Click the “App launcher” icon at the top left corner on the page, then click the “View all” option.
Step 2
The app launcher pop-up window will be opened, search our created object name in the search box and 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 all text fields are shown. Now we use that field one by one.
First, we will use text data type field
Next, scroll down and use text area, text area long and text area rich fields.
Scroll down and use the text area encrypted data type field and then click the “Save” button to store all the given data.
Summary
Finally, we created five different text fields and successfully tested those data types in salesforce org.
Our given information will be saved and an encrypted field can encrypt the given data.