Creating Salesforce Custom fields

Salesforce Custom fields :- Up to now we have created custom app, custom object and now we are going to create Salesforce custom fields. When we talk about fields in Salesforce there are two types of fields they are

  1. Standard Fields.
  2. Custom Fields.

Standard Fields :- In Standard Fields these are the four Standard fields get created when an object is created.

  • Name.
  • Owner.
  • Created By.
  • Last Modified By.

Example:-  if we want to create a field for custom object Pharma Products so what we do now. To create a field in Pharma Object, go to the object | Object definition page | Create new field. So how do we go to object definition page.

Go to Setup |  Build | Create | Objects.

Now list of all objects that are present will be displayed. Now select the respective Object that you want to create a field. Here we are selecting Pharma Product custom object.

Salesforce fields

As shown above four Standard fields are created when an object is created but custom fields are not created by default.

When creating new custom field instep 1 we have to choose thefield types. In Salesforce.com we have the following field types.

Auto NumberFormulaRoll-Up Summary
Lookup RelationshipMaster-Detail RelationshipExternal Lookup Relationship
CheckboxCurrencyDate
Date/TimeEmailGeolocation
NumberPercentPhone
PicklistPicklist(Multi-Select)Text
Text AreaText Area(long)Text Area(Rich)
Text(Encrypted)URL

Click on New button to create new custom field for an object Pharma product. In this example we are going to create Price field for an object Pharma product.

ADVERTISEMENT
Field types in Salesforce

Field type is mandatory while creating fields in Salesforce.com. Price corresponds to currency so we are selecting currency as field types. If we are creating a filed for phone number then we have to select field type phone in Step 1. All other field types will be explained in detail later.

  • Now click on Next Button.

Step 2.

In Step 2 we have to enter all details like Field label, Length, Field Name.

Custom fields

Now click on Next button. In Step 3 we have to establish field level security. Select the profiles to which this field is to be visible. In our Upcoming Salesforce Tutorial we will learn about What is Field level Security in Salesforce.

Creating Salesforce Custom fields

Now click on Next button as shown above. Now add to page layout to which this field is to be visible

Creating Salesforce Custom fields

Finally click on save button. Alright successfully we have created Salesforce Custom field. To check our how custom field will appear in UI.

Now go to custom object Pharma Product.

Now click on new Button to create new Record.

Creating Salesforce Custom field