How to create a custom field in SalesForce?
- Create a custom field in SalesForce
- Accessing SalesForce setup Object Manager
- Create custom field in SalesForce
- SalesForce custom field data types
- How to create fields in SalesForce
- How to delete a custom field in SalesForce?
- Frequently Asked Questions
- How to create and use custom fields in SalesForce? - video
Create a custom field in SalesForce
Creating a custom field in SalesForce is done in the Setup > Object Manager menu, from where it is possible to either create custom fields for your SalesForce client, or also to delete custom fields.
Add Custom Fields Unit | Salesforce TrailheadCreate Custom Fields - Salesforce Help
Accessing SalesForce setup Object Manager
Start by opening the SalesForce setup menu in the gear menu > setup.
Once in the setup, open the Object Manager menu, by directly clicking on the tab name.
Create custom field in SalesForce
From there, select the type of object for which you want to create a custom field in your SalesForce client, for example:
- account custom field,
- contact custom field,
- opportunities custom field,
- reports custom field,
- or any other custom field for the object you want.
Once the object has been selected, find the fields and relationships option.
In the Fields and Relationships menu, the list of all fields accessible for the object will be displayed. Create another one by clicking on the new button.
SalesForce custom field data types
The first information to provide will be the data type, what kind of field are you creating?
- Auto number, a system generated sequence number that uses a display format you define; The number is automatically incremented for each new record,
- Formula, a read only field that derives its value 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 displays the sum, minimum, or maximum value of a field in a related list or the record count of all records listed in a related list,
- Lookup relationship, creates a relationship that links this object to another object. The relationship field allows users to click on a lookup icon to select a value from a popup list. The other object is the source of the values in the list.
- Checkbox, 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 if you export data to Excel or another spreadsheet.
- Date, allows users to enter a date or pick a date from a popup calendar.
- Data/Time, allows users to enter a date and time, or pick a date from a popup calendar. When users click a date in the popup, that date and the current time are entered in the Date/Time field.
- Number, allows users to enter any number. Leading zeros are removed.
- Percent, allows users to enter a percentage number, for example, 10 and automatically adds the percent sign to the number.
- Phone, allows users to enter any phone number Automatically formats it as a phone number.
- Picklist, allows users to select a value from a list you define.
- Picklist (Multi-Select), allows users to select multiple values from a list 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), allows users to enter up to 131072 characters on separate lines.
- Text Area (Rich), allows users to enter formatted text, add images and links. Up to 131072 characters on spearate lines.
- Text (Encrypted), allows users to enter any combination of letters and numbers and store them in encrypted form.
- Time, allows users to enter a local time. For example, 2:40 PM, 14:40, 14:40:00, and 14:40:50:600 are all valid times for this field.
- URL, allows users to enter any valid website address. When users click on the field, the URL will open in a separate browser window.
How to create fields in SalesForce
The next step, after having chosen the data type, will be to enter the required field details, which can be different depending on which type of custom field you are creating in SalesForce.
Field label will always be necessary, as well as a field name, a field description, and a help text. In some cases, other information such as field length might be required to create custom field SalesForce.
It is also possible to define if the field is required for the creation a related object, if it must be unique or not, if it has an external identification number in an external system, and eventually a default value.
Next step is to define the field security, by selecting to which type of users the field will be visible and accessible, as not all fields might need to be accessed by any type of user.
Last step in field creation is to select the page layout, when applicable.
A new custom field might not need to be displayed on all page layouts, but this entirely depends on the field need and your local client configuration.
And that’s it! After clicking save, the field should be created, and it will be displayed in the list of fields for the object.
How to 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 for which you want to delete a custom field, go to fields and relationships, find the field, and open the menu on the right side of the line of the field.
From there, select edit to change the custom field, or select delete to remove it from the system, along with all information that has been previously stored for that field.
A popup will ask for confirmation before deleting the field.
If you accept the deletion of the field, the information contained in that custom field will still be accessible for 15 days, after what it will be lost forever.
Therefore, proceed carefully before deleting a custom field in SalesForce!
Frequently Asked Questions
- What are the key considerations when creating custom fields in Salesforce for data accuracy?
- Considerations include ensuring field relevance, setting appropriate field types, and implementing validation rules to maintain data integrity.
How to create and use custom fields in SalesForce?
Yoann Bierling is a Web Publishing & Digital Consulting professional, making a global impact through expertise and innovation in technologies. Passionate about empowering individuals and organizations to thrive in the digital age, he is driven to deliver exceptional results and drive growth through educational content creation.