0% found this document useful (0 votes)
11 views

Session 5 Objects

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Session 5 Objects

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Ranjith Krishnan

SESSION 5

Object :
1. Objects are nothing but tables in the regular database.

2. Any data stored in the salesforce will be saved to objects.

3. It consist of Field (columns) and record (rows)

4. There are two types of objects


a. Standard Objects.
b. Custom Objects

4. Standard Objects:
a. Objects which are created by the salesforce are called standard objects.
Example: Account, Contact, User, Profile , UserRole, Lead, Opportunity etc.,
b. Standard Objects cannot be deleted but can be customized.

Object consists of fields to store specific type of data. Example shown below is a representation of data
from an Account object and its fields.
Ranjith Krishnan
[email protected]
1
Ranjith Krishnan
Fields are nothing but columns in tables. For standard object Account, we have fields such as “Account
Owner”, “Account Name”, “Industry”, “Billing City” etc., as shown in the screen shot below.

The record highlighted box denotes a row in the object called as “Record” (or Phil Smith record).

Admin can also create new custom fields under standard object to capture your business specific
information.

Record -A collection of fields that store information about a specific item of a specific type (represented by
an object), such as a contact, an account, or an opportunity.

For example, you might have a contact record to store information about Joe Smith, and a case record
store information about his training inquiry.

There are different types of Fields available in Salesforce to capture the data specific to your business
need.

Ranjith Krishnan
[email protected]
2
Ranjith Krishnan
Example shows the Account Object and its fields such as Account Name is text type to store company
name, Phone is to store phone number and Annual Revenue is to hold currency value.

5.Custom Objects :
a. These are the objects created by user to meet his organizational business requirement. .
b. All the custom objects are appended with __c (double underscore with character ‘c’)
Example : Training__c, Department__c , Employee__c ,Project__c .

6. Steps to create Custom Objects


a. Classic :
Setup
|--->Build
|--->Create
|--->Objects
|--->New Custom Objects
b. Lightning:
Setup
|---> Platform tools
|---> Objects and Fields
|---> Create New Object

Step 1: Enter Object Label


Example: Training
Note : Objects are displayed on the User Interface with object Label

Step 2: Enter Plural Label


Example : Trainings
Note : If we create a tab for this object ,label that should be display on the tab is
called plural Label.

Step 3: Enter Object Name


Example : Training
Note : Name used to refer the object in API (Program) .

Step 4: Context sensitive help


1. On Every object salesforce provides help for this page Link.
2. When we click on the link which document should be opened is defined
using this settings.
a. Open the standard Salesforce.com Help and Training window.
If this option is selected salesforce standard document will be opened.

Ranjith Krishnan
[email protected]
3
Ranjith Krishnan
b. Open a window using a Visualforce page .
If we choose this option we can create our own visualforce page as help document.

Step 5:: Record Name Label and DataType


a. Salesforce by defualt on every custom object creates one standard field with name "
Name".
b. With what label this field should be displayed on the ui is define as Record Name Label.
c. This is a required field.
d. This will accept only Text and AutoNumber as datatype.
e. If we choose the data type as Text ,This will accept alphanumeric data and user has to
manually enter the data.
f. If we choose the data Type as Autonumber, Then system will generate the data based on the
format what we have given .

Example :
Format : DPT{0000}
Start :0
DPTO0001
DPTO0002
DPTO0003

Format : OR-{000}
Start : 501
OR-501
OR-502

Format : {mm}{dd}{000}
Start :1
1029001
1029002

Step 6: Optional Features:


These options can be enabled or disabled at any stage of the application

a. Allow Reports : If you enable this option, we can create reports on this object data.
b.Allow Activities : If you enable this option we can create Events and Tasks on this object.
c.Track Field History : If you enable this option we can track the changes made on the fields
of this object .
d.Allow in chatter Group: If you enable this option we can create chatter groups on this object.

Step 7: Object Classification:


a. Allow Sharing
b. Allow Bulk API Access
c. Allow Streaming API Access

Note : If we enable all the three options then it is Enterprise Application object.
If we disable any one of this option we call it as Lightning application object.

Ranjith Krishnan
[email protected]
4
Ranjith Krishnan

Step 8 : Deployment Status :


In Development: If we enable this option only Administrator will be able to access this
object ,no other user can see this object .

Deployed : If we enable this option, then all the users in the organization can access
this object based on security model of the organization.

Step 9: Allow Search : If we enable this option content of this object can be searched from global
search.
.
Step 10: Object Creation Option:
These options can be enabled or disabled only at the time of creating an object.
a. Add Notes and Attachments related list to default page layout.
b. Launch New Custom Tab Wizard after saving this custom object.

Schema Builder:
1. We can also build custom objects using Schema builder.
2. Setup
|--->Build
|--->Develop
|--->Lightning Bolt
|--->Schema Builder
|--->Elements
|--->Drag and drop objects icon.

Q:: In How many ways we can create custom objects?


A:: Three ways
1. Standard Navigation
2. Schema Builder
3. Metadata SOAP API web service

Q:: Objects falls under which part of MVC ?


A:: Model

Q:: How many custom objects we can create in the salesforce ?


A:: It depends on the edition .
Unlimited Editions : 2000
Enterprise : 200
Developer : 400
Professional : 50

Ranjith Krishnan
[email protected]
5
Ranjith Krishnan
Note : In salesforce every object has three character unique Id (Entity Id).
Account -- 001
Contact -- 003
User -- 005
Opportunity -- 006
Profile -- 00e
Lead -- 00Q
Order -- 801
Case -- 500
Solution -- 501
Training__c -- a01

Usecase1: Create Custom Objects.


a.Object :Department
Record Name Label : DepartmentNo
Name Field : AutoNumber
Format : DP-{000}
Start :1

b.Object :Employee
Record Name Label : EmpNo
DataType : AutoNumber
Format : EMP{mm}{000}
Start :1

c.Object :Project
Record Name Label : ProjectNo
DataType : AutoNumber
Format : PRJ-{00}
Start :1

c.Object :Trainee
Record Name Label : Trainee
DataType : AutoNumber
Format : TRN-{00}
Start :1

Ranjith Krishnan
[email protected]
6

You might also like