What is a field in Salesforce

How do I create a custom field in SalesForce?

Create a Custom Field SalesForce

Creating a custom field in SalesForce is done via the Setup> Object Manager menu. There you can either create custom fields for your SalesForce client or delete custom fields.

Add custom fields Unit | Salesforce Trailhead
Create Custom Fields - Salesforce Help

Access to SalesForce Setup Object Manager

First, open the SalesForce setup menu in the gear menu> Setup.

In Setup, open the Object Manager menu by clicking the tab name directly.

Create a custom field in SalesForce

There, select the object type for which you want to create a custom field in your SalesForce client. Example:

After selecting the object, find the Fields and Relationships option.

In the Fields and Relationships menu, the list of all fields accessible for the object is displayed. Create a new one by clicking the New button.

SalesForce data types for custom fields

The first piece of information to be provided will be the data type, what kind of field are you creating?

  • Automatic number, a system-generated sequence number that uses a display format that you define. The number is automatically increased for each new data record.
  • Formula, a read-only field whose value is derived from a formula expression you define. The formula field is updated when any of the source fields change.
  • Roll-up summary, a read-only field that shows the total, minimum, or maximum value of a field in a related list, or the number of records in all of the records in a related list.
  • Lookup relationship, creates a relationship that links this object to another object. The relationship field allows users to click a search icon to select a value from a pop-up list. The other object is the source of the values ​​in the list.
  • This check box allows users to select a true (checked) or false (unchecked) value.
  • Currency, allows users to enter a dollar or other currency amount and automatically formats the field as a currency amount. This can be useful when exporting data to Excel or another table.
  • Date: Allows users to enter a date or select a date from a pop-up calendar.
  • Date / Time: Allows users to enter the date and time or select a date from a pop-up calendar. When users click a date in the pop-up, that date and current time are entered in the Date / Time field.
  • Number, users can enter any number. Leading zeros are removed.
  • Percent: Allows users to enter a percentage, e.g. B. 10, and automatically adds the percentage sign to the number.
  • Phone, allows users to enter any phone number. Automatically formats this as a phone number.
  • Picklist: This option allows users to select a value from a list that you define.
  • Selection list (multiple selection): Users can select several values ​​from a list that you define.
  • Text, allows users to enter any combination of letters and numbers.
  • Text area, allows users to enter up to 255 characters on separate lines.
  • Text Area (Long): Users can enter up to 131072 characters on separate lines.
  • Text Area (Rich): Allows users to enter formatted text and add pictures and links. Up to 131072 characters on spearate lines.
  • Text (encrypted): Users can enter any combination of letters and numbers and save encrypted.
  • Time, allows users to enter a local time. Example: 2:40 p.m., 2:40 p.m., 2:40 p.m. and 2:40 p.m., 50,600 p.m. are all valid times for this field.
  • URL, allows users to enter any valid website address. When users click the field, the URL opens in a separate browser window.
Custom field types - Salesforce help

How to create fields in SalesForce

After choosing the data type, the next step is to enter the required field details, which may differ depending on the type of custom field you are creating in SalesForce.

A field designation as well as a field name, a field description and a help text are always required. In some cases, other information, such as field length, may be required to create a SalesForce custom field.

It can also be defined whether the field is required for the creation of a related object, whether it must be unique or not, whether it has an external identification number in an external system and finally a default value.

The next step is to define field security by choosing which type of user you want the field to be visible and accessible to, as all fields may not need to be accessed by every type of user.

The final step in creating the fields is choosing the page layout, if applicable.

A new custom field may not need to appear on all page layouts. However, this depends entirely on field requirements and your local client configuration.

And that's it! After you click Save, the field should be created and appear in the list of fields for the object.

How do I delete a custom field in SalesForce?

To delete a custom field in SalesForce, open the setup menu under the gear icon in SalesForce Lightning‌ and go to Object Manager. From there, select the object you want to delete a custom field for, navigate to Fields and Relationships, find the field and open the menu on the right side of the field row.

From there, select Edit to change the custom field, or Delete to remove it from the system and any information previously saved for that field.

A popup will ask you for confirmation before clearing the field.

If you accept to delete the field, the information contained in this custom field will be available for 15 days after it has been lost forever.

So be careful before you delete a custom field in SalesForce!