Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Creating User Roles

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

CREATING CUSTOM OBJECTS IN SALESFORCE

Object Provides a Table, in which the records will get resides. All salesforce records will
store into the objects.

Salesforce provides 2 types of Objects.

1. Standard Objects:

Salesforce provides a set of readymade objects by default, which has been created
upon Salesforce CRM application development.

Ex: Account, Contact, Opportunity, Campaign, Lead, Case, Solution, Order, Contract,
Forcast, Product, Pricebook, Performance Cycle, Goal, Metric, Feedback, etc.

2. Custom Objects

Salesforce allows us to create our own custom objects based on the application
requirement. Custom objects are database tables that allow you to store data specific to
your organization in salesforce.com. You can use custom objects to extend salesforce.com
functionality or to build new application functionality.

Once you have created a custom object, you can create a custom tab, custom related lists,
reports, and dashboards for users to interact with the custom object data.

Note:

a. In Developer Edition, we can create max. of 400 Custom objects.


b. In Unlimited Edition, we can create max. of 2000 custom objects.

Note: Salesforce supports purely the ORM Technology (Object Relationship and Mapping),
where it Creates a New Table in Database.com upon creating a new Object in Salesforce.

Each Object represented as a Table in the backend / Database.

Object Type Object Name Table Name


Account Account
Contact Contact
Opportunity Opportunity
Lead Lead
Standard Objects Campaign Campaign
Case Case
Solution Solution
Product Product2
Order Order
.....etc ....etc
Position Position__c
Custom Object Customer Customer__c
(Each Table Name postfixed Client Client__c
with “__c”. Which indicates it Candidate Candidate__C
is a Custom Object)
.... etc ... etc

Note:

1. In-order to manage the records inside the object, Salesforce provides a Tab for
each object.
2. By using the Tab, we manage the records inside the objects by performing the
DML operations like INSERT / UPDATE / DELETE/ SELECT.

Note:

1. All the Tab names are provided with the "Plural Names"
(Ex: Accounts, Contacts, Opportunities, Cases, Solutions, Leads, Positions,
Customers, Candidates,... etc.).
2. All the Object Name's are provided with the "Singular Name".
(Ex: Account, Contact, Opportunity, Case, Solution, Lead, Position__c,
Customer__c, Candidate__c, etc.)

Tab Name Object Name


Accounts Account
Contacts Contact
Opportunities Opportunity
Leads Lead
Campaigns Campaign
Cases Case
Solutions Solution
Products Product2
Orders Order
Positions Position
Customers Customer
Clients Client
Candidates Candidate
.... etc ... etc

Note: We can't remove the standard objects from salesforce.

Each object in salesforce will be identified by using an unique object Id, allocated by
salesforce. Object Id is a 3 character Alphanumerical number generated randomly by
salesforce.
Tab Name Object Name Object Id
Accounts Account 001
Contacts Contact 003
Opportunities Opportunity 006
Leads Lead 00Q
Campaigns Campaign 701
Cases Case 500
Solutions Solution 501
Products Product2
Orders Order 801
Positions Position A00
Customers Customer ...
Clients Client ...
Candidates Candidate ...
.... etc ... etc

Note: Upon creating a new record in the salesforce object, Salesforce will allocate an 18
character alphanumeric id.

Each Record in salesforce, will be identified by using an 18 character's Unique identification


number called as “RecordID”.(Which is a Case Sensitive ID.)

https://ap2.salesforce.com/701280000006Rmw

Note:

1. First 3 characters indicates the Object Schema (i.e Object Id.) (Ex: 001)
2. Remaining 15 characters will indicates the actual record id.

Note:

1. Salesforce provides the 15 characters Id in the URL.


2. It will not display the last 3 characters in the URL, because of the security
reasons.
3. To get the Complete 18 character's Id, we need to make a query to the Database
as below.

Navigation to query 18 characters ID:

Goto Your Name  Click on "Developer Console"

1. Expand the Middle Tab Bar

2. Click on the Tab "Query Editor"

3. Enter the Query "select id, name from Campaign"


4. Click on "Execute" button.

STEPS TO CREATE CUSTOM OBJECT:

Goto Setup  Goto Build Menu Goto Create  Click on "Objects"

1. Click on "New" to create a New Custom Object

2. Enter the Object Name, Plural Name, API Name, and Description as below

3. Select the Check boxes in the Optional Features Section as below

Allow Reports: This feature allows the user to generate some reports based on the data
exist in the object

Allow Activities: This feature allows the user to Create some Tasks / Assigning the Task /
Generating some Events based on the Object Records.
Track Field History: This field allows the user to Track the Field History whenever any of the
person modified the record values. (To Track the values like.. Who modified the record,
when they modified the record, what field’s values modified, old value and new values of
the field etc.)

Allow in Chatter Groups: It allows us to include the field changes in the chatter feeds.

4. Select the Object’s Deployment Status as “Deployed”

In Development: It the object’s Deployment status is “In Development”, this object can’t be
used by the other users.

Deployed: This object can be used by other users, in-order to create the records. i.e. It is
ready to use by the users.

5. Select the Check Box “Launch a New Custom Tab Wizard for the Custom Object”,
Which creates a new Tab for the object to manage the records(Insert / Update/
Delete/View).

6. Click on “Save” button

7. Select the Custom Object Tab Style from the Lookup field.
8. Click on “Next” button

9. Make this Tab to be visible for all the profiles by selecting the “Visible” checkbox.
Click on “Next” button

10. Click on “Save’ button

Note: For each Custom object, salesforce provides 4 standard fields by default as below.

1. Name Field

2. Owner Field

3. Created By

4. Last Modified by.

Note:

1. In Developer Edition, We can create max. Of 500 Custom fields per an object.
2. In Unlimited Edition, We can create max. Of 800 custom fields per an object.
CREATING FIELDS IN OBJECT

Each object in salesforce can have a set of fields. Each field represents a column in the associated
table.

Ex:

1. Account Object: Rating Field represents --> Account Table : Rating Column.
2. Account Object: Name field represents --> Account Table : Name Column

Salesforce provides 2 Types of fields.

1. Standard Fields
2. Custom Fields

Standard Fields:

 These are the readymade fields provided by the salesforce for each object.
 We can't create any more standard fields for an object
 We can't remove the existing standard fields from the object, but we can customise the field
label based on the need.
 These fields are using by the salesforce CRM application.

Each Standard field contains 2 Properties.

1. Field Label Which Represents the Label / Text displaying in the User Interface
2. Field Name  Which represents the Column Name in the Database Table (Ex: Account)

Ex:

 Field Label: Account Name (Label in the UI)


 Field Name: Name (Column Name in Account Table)

Custom Fields:

While customizing the existing salesforce CRM application / creating New Custom Applications, we
can able to add new custom fields also to the object. i.e. developers can able to add some new fields
to the objects (either Standard Object / Custom Object)

1. We can create one / more custom fields per an object.


2. We can able to delete the custom fields from the object.

Each custom field contains the 2 Properties.

1. Field Label: Which represents the Text / Label information to be displayed in the User
Interface(i.e. Edit Page / Detail Page)

2. API Name: Which represents the Column Name in the associated table (Ex: Account)
Note: Each Custom Field API name is PostFixed with "__c", which indicates this is a custom field.

Ex: Field Label  Cusomer Name API Name  Customer_Name__C

Field Label  Balance API Name : Balance__c

Note:

 Unlimited Edition: We can add max. of 800 custom fields per an object.
 Developer Edition: We can add max. of 500 custom fields per an object.
FIELD TYPES IN SALESFORCE

When creating a custom field in Salesforce, the first step is to select the appropriate data
type for the field. There are many different field types which allow the storage of records of
various data values such as numbers, dates, percentages, and so on.

1. Auto Number:

 This field type is used to make the field value to be auto generated.
 It is a system generated field. And Read-Only Field.
 Salesforce will generate the value for the system generated fields while saving the
record.

Note: All system generated fields will be displayed only in detail page of the record.

System Generated Fields: ID, Auto Number, Created By, Last Modified by, etc.

Properties:

1. Field Label: Enter the Label information to be displayed in the User Interface /
Page Layout.
Ex: Position ID / Customer Id / Account Number...etc.

2. Field Name: Enter the Name to be used to Create a New Column in the Table.

Ex: Customer ID  Customer_id__c


Position ID  Position_id__C

3. Display Format: This attribute is used to specify the display format of the auto
generated id.

Syntax: PID-{000000}

4. Starting Number: This attribute is used to specify the Starting number to be used
to generate the Position ID values.

Ex: 100001

Position Id's : PID-100001, PID-100002,..... etc.

Note: Each time, when the user creates a new record in the table, then salesforce
will generates a new number for the record. Each time the auto number value will be
incremented by 1.

5. Generate Auto Number for the Existing Records: Select this checkbox, if you
need to generate the auto numbers for the existing records in the table.
2. Text Field: This Field type is used to enter the text information in a single line upto max.
of 255 characters.

Note: We can enter Alphanumeric characters along with the Special Characters also.

Properties:

1. Field Label:

2. Field Name:

3. Max. Number of Characters: This property is used to enter an integer, which


indicates number of characters to be allowed in the field.

4. Required Checkbox: We need to select this checkbox, in-order to make the field
mandatory.

3. Text Area Field: This field is used to enter the data in multiple lines upto max. of 255
characters.

Properties:

1. Field Label:

2. Field Name:

3. Number of Characters:

4. Text Area Long: This field allows us to enter the data in multiple lines upto max. of
1,31,072 characters.

Properties:

1. Field Label:

2. Field Name:

3. Number of Characters:

5. Text Area Rich: This field allows us to enter the data in multiple lines upto max. of
1,31,072 characters.

We can change the Font Color, Size, Style and we can include the images, hyperlinks etc.

Properties:

1. Field Label:
2. Field Name:

3. Number of Characters:

4. Number of Lines Visible

6. Phone Field: This field is used to store the 10 digit phone numbers.

Once the user enters the 10 digit phone number, then it will convert the phone number into
US phone number format.

Ex: Enter Phone Number : 9988776655

After Saving the Record ---> (998) 877 - 6655

Properties:

1. Field Label:

2. Field Name:

7. Email Field: This field is used to enter the valid email addresses, which will be verified by
the salesforce upon saving the record.

Properties:

1. Field Label:

2. Field Name:

8. Number Field: This field is used to enter the Numerical values along with the decimal
point numbers.

Properties:

1. Field Label:

2. Field Name:

3. Number of Digits: (Max. number of Digits to be upto 18)

4. Number of Digits allowed After Decimal Point:

9. Currency Field: This field is used to enter the Currency values.

Once the record gets saved, it will display the currency value by prefixing with the Currently
configured currency symbol in the salesforce.
Ex: Employee Salary : 100000  Save  Employee Salary : $ 100000

Properties:

1. Field Label:

2. Field Name:

10. Percent Field: This field type is used to display the percentage values in the records.

Once the record get saved, then the percent value will be postfixed with the "%" symbol.

Ex: Discount : 10  Save  Discount: 10%

Properties:

1. Field Label:

2. Field Name:

11. Date Field: This field is used to store the Date values, by selecting from the Popup
calendar.

Properties:

1. Field Label:

2. Field Name:

12. DateTime Field: This field is used to store the DateTime values, by selecting from the
Popup calendar.

Properties:

1. Field Label:

2. Field Name:

13. Picklist Field: Used to select only one item from the collection of items. This is also
called as Drop down list.

Note: We can add max. Of 1000 elements in the picklist field.

Ex: 1. Country (India, USA,UK, Australia, Japan) --> We have to select only one country.

2. Industry (Banking, Insurance, Finance, Helathcare, Chemical) --> We have to select


only one industry.
14 Picklist Multiselect: Used to select the one / more values by holding the control key from
the collection of items.

Ex: Hobbies (Chess, Charams, Tennis, Cricket, FootBall, Rugby, Music, Movies)

Note: We can select one / more items by holding the control key.

15. Text Encrypted: Used to enter the password values, Credit Card Numbers, Debit Card
Numbers, Social Security Numbers and Insurance Policy Numbers, where it should display
the characters in Masked format.

16. Url Field: Used to enter the Website / URL names.

Ex: www.tcs.com / https://login.salesforce.com / www.google.co.in

17. Checkbox Type: Used to store the TRUE / FALSE values.

It returns TRUE, when the checkbox is selected. Else it will returns FALSE.
CREATING CUSTOM FIELDS IN OBJECT

To create our own fields in the object, we have to use the below navigation.

1. Using Standard Navigation

Goto Setup  Goto Build Menu  Goto Create  Goto “Objects”  Click on the
“Required Object”

- Goto the “Custom Fields & Relationships Section”


- Click on “New” button, to create a New field.

2. Using Force.com Quick Access Menu.

Click on the Tab (Ex: Positions)  Goto Force.com Quick Access Menu  Click on
“View Fields”

- Goto the “Custom Fields & Relationships Section”


- Click on “New” button, to create a New field.

3. Select the Field Type from the Radio Buttons List (Ex: Currency / Number / Text /
Pick List/ etc.)

4. Click on “Next” button


5. Enter the Field Label, Field Name, Length and Description of the field
6. Make the Field Required using “Required” checkbox as below

7. Click on “Next” button


8. Make the Field is Visible for All / Required Profiles by using “Visible Check Box”

9. Click on “Next” button


10. Click on “Save” Button
CREATE THE POSITION OBJECT WITH THE BELOW FIELDS

Object Name: Position

1. Position Id ---> Auto Number (POS-100001, POS-100002,...etc)


2. Position Name ---> Text
3. Location: Picklist (Hyderabad, Bangalore, Chennai, Mumbai, Pune, Delhi, Noida)
Note: Values should display in Sorting Order.
4. Position Status : Picklist (New Position, Open Approved, In Progress, On Hold, Closed)
Note: Default Status should be “New Position”
5. Number Of Position --> Number
6. Open Date: Date Field: Starting Date of Position Creation.
7. Closed Date: Date Field: (Target Date to Close the position) : Required
8. Minimum Pay : Currency Field (Minimum Salary can offer to the candidate)
9. Maximum Pay : Currency Field (Maximum Salary for the position): Required
10. Position Description: Text Area Field (Description of the position): Required
11. Skills Required : Text Area Rich (Skills Required from the Candidate)
12. Travel Required : Checkbox (Travel to Client location)
13. Passport Required : Checkbox (Passport is required)

CHATTER FEED ON CUSTOM OBJECT’s LAYOUT

By default, salesforce will not provide the Chatter Feed on the Custom Object Record's
detailed Layout.

We need to enable it manually as below.

Goto Setup --> Goto Build Menu in Left Panel

1. Click on "Customise" option and expand it.

2. Goto "Chatter" option and expand it.

3. Click on "Feed Tracking" link.

4. Select the Object from the Left Panel.

5. Select the Checkbox "Enable Feed Tracking".

6. Click on "Save" button.


CREATING A CUSTOM OBJECT TAB

Tab is a user interface component to user creates to display custom object data.

It provides a user friendly interface to manage the records inside the object by performing
DML operations (Insert / Update / Delete / View).

Salesforce Provides 4 types of Tabs as below.

1. Custom Object Tabs:


Custom object tabs display the data of your custom object in a user interface
tab. Custom object tabs look and function just like standard tabs.

2. Web Tabs:

Custom web tabs display any external web-based application or web page in
a Salesforce tab. You can design web tabs to include the sidebar or span
across the entire page without the sidebar.

3. Visualforce Page Tabs:

Visualforce tabs display data from a Visualforce page. Visualforce tabs look
and function just like standard tabs.

4. Lightening Page Tabs:

Lightning Page tabs let you add Lightning Pages to the Salesforce1 and
Lightning Experience navigation menus.

Creating the Tab: (Navigation)

Goto Setup --> Goto Build Menu in Left Panel

1. Click on "Create" and expand it.

2. Click on "Tabs" link.

3. Goto "Custom Objects Tabs" section.

4. Click on "New" button, to create a New Tab.

5. Select the Object Name from the Picklist (Ex: Customer)

6. Select the Tab Style, to be applied for the object.

7. Click on "Next" button.

8. Make this Tab to displayed for all profile users. and Click on "Next" button.
9. Make this object to be visible in all applications. and Click on "Save" button.

Note: An Object can have only One Tab.

FORCE.COM QUICK ACCESS MENU

This menu allows the user to jump into the various options of an object quickly. Ex: We can
view the Fields, Create New Fields, View Record Types of an object, View Object Details,
Customise Table Columns, etc.

How to Enable "Force.com Quick Access Menu":

Goto Your Name --> Click on "My Settings"

1. Goto Personal and Expand it.

2. Click on "Advanced USer Details" link.

3. Click on "Edit" button.

4. Select the checkbox "Enable Force.com Quick Access Menu".

5. Click on "Save" button.

ENABLE COLLAPSIBLE SIDEBAR

Enable Collapsible SideBar:

Goto Setup --> Goto Build Menu in Left Panel

1. Click on "Customise" menu and expand it.

2. Click on "User Interfaces" link.

3. Goto "SideBar" section.

4. Select the checkbox "Enable Collapsible SideBar".

5. Click on "Save" button.


PAGE LAYOUTS IN SALESFORCE

Upon Creating a new object, Salesforce provides a Page Layout Which allows the users to
manage the records in the associated object.

Pagelayout provides a Graphical user interfaces, to perform DML operation on object


records.

Each Page Layout contains 2 Modes as below.

1. Edit Mode / Edit Layout / Edit Page:

o This mode will allow the user to create the new records or to modify the
existing records.
o This mode will provide the user interface, with all the fields in Editable
format.

Note:

Edit Mode will be opened upon click on "New" button, to Create a New Record. Or
"Edit" button to modify the existing record.

2. Detail Mode / Detail Layout / Detail Page:

o One the USer Click on "Save" button, after filling up the data in the form,
then Salesforce create the record in the object and will redirect the user to
Detail Page of the record.
o It allows the user to modify / Delete the records.
o Detail Layout provides "Inline" Editing feature, which allows us to modify the
record values in the same editor itself.(By double click on the field)

Note: An object can have one or more PageLayouts.

We can see the PageLayouts with the below navigation.

Standard Object: Navigation

Goto Setup --> Goto Build Menu in Left Panel

1. Click on "Customise" and expand it.

2. Select the Required Object (Ex: Accounts) and expand it.

3. Click on "Page Layouts" link.


Custom Object: (Force.com Quick Access Menu)

Click on the Required Tab (Ex: Positions)

1. Expand the Force.com Quick Access Menu.

2. Click on "View Object" link.

3. Goto "Page Layouts" section.

PAGELAYOUT CUSTOMIZATIONS

The user can customise the Page Layout provided by salesforce, if the user interface is not
look like attractive we can arrange the fields based on our requirement.

By using PageLayout Customisation, we can perform the below operations on the Layouts.

1. We can Add one or more sections in the Layout.

2. We can arrange the fields either in One or Two Columns.

3. We can specify the Tab Key order based on the need.

4. We can move the fields from one section to another section.

5. We can Add / Hide the fields from the Layout, if it is not required.

6. We can make a field required / read-only

7. We can specify section settings / properties. By which we can indicate the section
to be displayed in both Edit Layout and Detail Layout.

8. We can Add / Remove the required Related List on the Layout.

9. We can customise the Columns in the Related List.

10. We can customise the Buttons on the Related Lists.

You might also like