0% found this document useful (0 votes)
22 views6 pages

Fields

Uploaded by

prabathkotti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views6 pages

Fields

Uploaded by

prabathkotti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Fields

Object Fields:
1. Fields are nothing but the columns in the regular database.
2. There are two types of fields.
a. Standard Fields
b. Custom Fields

3. Standard Fields:
a. There are the fields created by salesforce.
b. These fields cannot be deleted.
c. We can customize the fields
d. Some of the standard fields are called System fields.

4. System Fields:
a. There are the fields which are created by salesforce and updated by salesforce .
b. There are 7 System Fields
1. ID :
a. Salesforce by default creates 18 Character unique Id for every
record. b..Salesforce will recognize the record by using this Id
c. First Three characters of Id will represent object (Entity Id).
d. It is case-sensitive.
e. This can also be referred with 15 Digit Id. The conversion from 15 to 18 digit
will be handled by
the system itself.

2. isDeleted :
a. Whenever we delete any record, value of isDeleted field is set as True.
b. When we delete any record it will still be in the object for 15 days.
c. After 15 days of time, the records would be permanently deleted.

3. CreatedById
a. This filed will store the 18 character Id of the user who created this record.

4. LastModifiedById
a. This field will store the 18 character Id of the user who last modified this record

5. CreatedDate :
a. This field will store date and time when the record was created.

6. LastModifiedDate :
a. This field will store date and time when a user was last modified manually.

7. SystemModStamp
a. This field will store date and time when the record was last modified this record
programmatically.

Q: Which fields we call as System Audit Fields?


a.CreatedById
b.LastModifiedById
c.CreatedDate
d.LastModifiedDate
e.SystemModStamp
5: Custom Fields:
a. These are the fields which are created by the user to meet an organizational
business requirement.
b. Salesforce has defined predefined datatypes to create the custom fields
1. Text :
Format : Alphanumeric
MaxLength : 255 Characters
Single|Multiple : Single Line

2. TextArea:
Format : AlphaNumeric
MaxLength : 255 Characters
Single|Multiple : Multiple Line (more than one line

3. TextArea(Long) :
Format : AlphaNumeric
MaxLength : 1,31,072 Characters
Default : 32,768 characters
Minimum Length : 256 Characters
Single|Multiple : Multiple (>= 2 or <= 50)

4. TextArea(Rich) :
Format : Formatted Data (link, image, format)
Max Length : 1,31,072
characters Default Length : 32,768
Characters Minimum Lines : 10
Lines

5: Phone :
This data type is used to store the phone numbers. The data will be formatted

6. CheckBox :
This data types will store the value of true or false

Screen shot from Opportunity Page layout (Private is check box field)

7. Currency :
Currency values are stored in this field.
Max Length : (Length of Integer +Length of Decimal) should be at max
18 characters
Example : $32000.20 (5 + 2 = 7 )
(Length of this value is calculated as 5 digits before decimal +
digits after the decimal 2= 7)

8. Date :
Allows users to enter a date or pick a date from a popup calendar.
For Example:

9. DateTime :
Allows users to enter a date or pick a date from a popup calendar and enter a time
of day.
Example:

10. Number :
These fields are used to store numerical values
Max Length : 18 characters (Length of Integer + Length of Decimal)

11. Percent :
These fields are used to store the percentage value by default '%' symbol
is appended to the data .
Max Length : 18 characters (Length of Integer + Length of Decimal)
0.60
Example:

12. Email :
This field will store the email id.
Note : Salesforce has defined validation rules to check the format of the email
address.

13. PickList :
a. It is a dropdown list from which we can select one option at a time.
b. Maximum we can provide 1000 options.
c. Length of each option can be 255 characters
d. We can sort options in the ascending order.
e. We can make the first option as default option by enabling the checkbox.
f. We can add /remove/edit /reorder the options based on business requirement.

Example: User can pick one value from the list of options as drop down.

14. PickList( Multi-Select) :


a. It is also a picklist field but we can select more than one option at a time .
b. We can provide maximum 300 options.
c. Maximum we select 100 options from 300 options.
d. Length of each option can be at max 255
characters Example:

15 .Text Encrypted:
a. It is used to store sensitive data with masked characters.
b. Maximum length of the field is 175 characters.
c. By default no one can access the data in the original format.
d. Users with permission ‘View encrypted data’ in profile can only see this data.
e. Text encrypted fields cannot be used in formulas
f. Encrypted fields cannot be used in search Criteria or filter Conditions.
g. Encrypted fields can be used in validations, search results, report results.

16. Auto-Number
a. Automatically assigns a unique number to each record.
b. The maximum length of any auto-number field is 30 characters,
c. 20 of which are reserved for prefix or suffix text.

Example:
E-{00000}{YYYY}{MM}-{0} -> 201704-1
6. Custom Fields Creation
a. Custom Fields can be created in four ways
1. Standard Navigation
2. Schema Builder
3. Force.com Quick Menu
4. Metadata SOAP API webservice

b. Standard Navigation
1. Lightning
Experience Setup
|---> Platform Tools
|---> Objects and Fields
|---> Object Manager
|---> Object Name
|--->Fields and Relation
2. Classic
Setup
|--->Build
|---> Create
|---> Object
|--->Object Name
|---> Custom Fields and Relations
|---> New

Step 1: Choose the dataType


Step 2: Enter field Details Like (Label,Name,Required, Unique)

Step 3: Next
Step 4: Next
Step 5: Save

b. Schema Builder
1. Lightning
Experience Setup
|--->Platform Tools
|--->Objects and Fields
|--->Schema Builder
2. Classic
Setup
|--->Build
|--->Lightning Bolt
|--->Schema Builder

Step 1: Choose the Object


Step 2: Choose elements
Step 3: Choose the dataType
Step 4: Enter the details
Step 5: Save
Note : if we create the fields using Schema builder fields are not added to
pagelayout.
: We need to manually add the fields to the pagelayout
Setup
|---> Build
|---> Create
|---> Objects
|--->Object Name
|---> PageLayouts
|--->Edit
|--->Add the fields

7. Field Dependency:
1. If need to control the values of one field by using another field then we use
field dependency.
2. Controlling Field:
a. We can choose the any of PickList Field and Checkbox field as controlling field.
b. If we choose any picklist field as controlling field, then picklist field can have only 300
options in it.
3. Dependent Field : We can choose PicklIst /MultiSelect PickList field as Dependent field.
4. We can create multilevel dependency.
5. Steps to create field
dependency Setup
|---Build
|---Object Name
| Custom Fields and Relations
| Field Dependency
| Create
| Object
| New
Step 1: Select the Controlling Field
Step 2: Choose the Dependent field
Step 3: Include and Exclude the dependent options for the Controlling Field.

Step 4: Save .

UseCase : Create Two Custom Fields in Training Object


Field Name DataType Options
City PickList Hyderabad, Chennai, Bangalore
Places PickList SRNagar, LBNagar
Chrompet, Tambaram
ElectronicCity, Marathahali

Create a field dependency.

You might also like