force.com index
TRANSCRIPT
-
8/10/2019 Force.com Index
1/32
Cloud computing defenition
Types of cloud computing
Cloud computing model of force.com
a)Multi-tenant architecture
b)Automatic upgrades
c)Subscription model
d)scalability e)Upgrades and maintenance
Understanding Force.com model
Force.com platform:
it includes sales cloud, service cloud and chatter
Model View Controller architecture:
Key Technology behind the force.com platform
Multi-tenant kernel
force.com metadata:
metadata is defined in XML
force.com webservice API :
used to access metadata stored on force.com through programmatically
APEX and Visualforce
Appexchange
Force.com Sites
Force.com development Force.com metadata
Connection to the database is done by salesforce metadata API
Online page editor and eclipse Force.com IDE
sandbox
a)Configuration-only sandbox
b)Developer sandbox
c)Full copy sandbox
Force.com application types
a)Content-centric applications
b)Transaction centric applications
c)Process centric applications
d)Data centric applications
Developing on the Force.com platform
a)declarative development -> developing application using using point and click
without code
b)programmatic development ->developing application using code
-
8/10/2019 Force.com Index
2/32
Model-->(metadata,salesforce objects)
View Controller View--->(tabs,forms and visualforce pages)
Controller-->(workflows,Apex triggers,Apex controllers)
Model
-
8/10/2019 Force.com Index
3/32
2Creating database on force.com
Types of objects on force.com object is the database table
a)standard object
They come packed with some standard properties
and functions related to CRM
b)custom object
By default, custom objects are given maximum
features of the standard objects and can be
customized completely.
Force.com data types: default fieldscreated by, last modified by,owner,created
date,modified date
custom fields of object
Text fields Text(max 255 char,single line)
pickliststhese are predefined text fields
dependent picklist
dependent picklist is a picklist whose values are
filtered by another controlling picklist
currency field
Phone,email
URL,checkbox
Required field universally required fields are :
unique field
extrenal IDonly text,number,email can make as external id
encrypted field
cannot be unique or external
Relationship
Lookup links object to another object
master detail type of parent child relationship betwn objects
an object can have 2 master object
video
title
year
Library management sysetm
-
8/10/2019 Force.com Index
4/32
book
ISBN no
-
8/10/2019 Force.com Index
5/32
It is a container to store data on Force.com
standard objects are less customizable.
Text area(max 255 char,multiple lines) Long Text area(max 32000 char,multiple lines)
Picklists are rendered as drop-down picklists on
the UI, but it is stored as text in the database
currency,date,date/time,email,number, master detail relationship,percent,phone,text,text area
an object can have 3 external id fields
cannot have default values
Encrypted fields are not indexed and hence not searchable
loosely coupled relationships
more tightly coupled
media
-
8/10/2019 Force.com Index
6/32
location
status
-
8/10/2019 Force.com Index
7/32
Rich Text area
They are not available in filters such as
reports, list views, and roll-up summary
fields.
customer
name
address book penalty
phone number customer name
Dob penalty fee
-
8/10/2019 Force.com Index
8/32
-
8/10/2019 Force.com Index
9/32
User Interface:
Application
Custom tabs
a)Custom object tabs b)Web tabs
c)Visualforce tabs
Page layouts a)List view /tab view
b)Detail view
c)Edit view
Page layout editor:
section and blankspaces
Adding a section
Blank Space
Custom buttons and links
a)detail page link
b)detail page buttons
c)List view button
Mini page layout
Visualforce
Visualforce content
Key components of
Visualforce
pages
controllers
a)standard controllers
-
8/10/2019 Force.com Index
10/32
b)custom controllers
c)controller extensions
d)standard list controller
Data binding in Visualforce
Using the Visualforce pages
in t organization
Buttons and links:
Page layouts
Visualforce tags
Binding tags with data andApex
Data bindings
Action bindings
layout components
:
StandardController or
Controller or Extensions
Title:
Action:
Sidebar:ShowHeader:
RenderAs:
:
:
:
:
Other layout components
-
8/10/2019 Force.com Index
11/32
apex:toolbar>
:
Standard Salesforce compon
:
Data components
:
:
Output components
:
Input components
:
:
:
:
AJAX components
-
8/10/2019 Force.com Index
12/32
An application or an app is a collection of tabs and objects used together to form a
business process
A custom tab is used to display object data or other contents embedded in the
application
We cannot create tabs for standard objects
Page layouts are needed to display the data collected in the system
The list view of objects is the first view a user sees
detail view shows the detail of a single record
The edit view also focuses on the single record, but this provides input fields to
enter and modify the records.
The page layout editor is used in the organization of the Fields, Custom S-
Controls,and Related Lists on a detail page layout.
A section is a logical grouping of fields on a page
A blank space can be added to align the fields properly in the section
Mini Page Layout contains a subset of the items in an existing page layout.
Visualforce is a markup language that uses syntax similar to HTML and XML, to
easily create rich-interfaces.
Visualforce uses XML-like syntax at the front-end to design pages and APEX as a
back-end to implement business logic.
Visualforce page can be a combination of Visualforce tags, HTML, and JavaScript.
We can create a Visualforce page up to 15 Mb
They provide standard functions such as save, delete and create records.
Standard controllers are added to a Visualforce page using the following syntax:
-
8/10/2019 Force.com Index
13/32
Custom controllers are written in Apex code and are used when we need to write
functionality other than the standard functionality
Controller extensions give the benefit of standard controllers as well as custom
controllers.
To create a standard list controller we add the attribute recordSetVar to the
header.
Context variables are shown using a prefix $ before them. For example, the login
user username can be referred to as:
{!$User.username}
{!$User.firstName}
-
8/10/2019 Force.com Index
14/32
nts
In AJAX format, instead of sending the complete page to the server, a partial page is
sent and the response is modified on the page immediately without refreshing it.
-
8/10/2019 Force.com Index
15/32
Visualforce related useful link(full list
of standard comps)
-
8/10/2019 Force.com Index
16/32
-
8/10/2019 Force.com Index
17/32
-
8/10/2019 Force.com Index
18/32
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_compref.htm
http://www.salesforce.com/us/developer/docs/pages/index_Left.htmhttp://www.salesforce.com/us/developer/docs/pages/index_Left.htm -
8/10/2019 Force.com Index
19/32
The basic rules of implementing
business logic
Rule syntax
a)Validation rules
b)workflow Rule
c)Approval process entry rules
Components of rule syntax
Validation rule:
Validation rules are attached to fields
Examples of validation Rules
Formula fields:
formula is similar to a spread sheet
formula field that is executed at run timecalculates the number of days after the
due date is over (assuming, we have all
the fields in media object)
calculating the return date
Cross object formula fields
calculating penalty
Rollup summary fields
Roll-up summary fields are used to
aggregate child information on the
master object
creating field on the master object is
done by rollup summary fields
Using workflows to automate business
processes
sending e-mail to members
Rule Name:Send Email to the user
Not(ISBLANK(Return_Date_c))
Workflow Actions:
a)Task
b)Email alert
c)Field update
d)Outbound message
Time dependent workflow
-
8/10/2019 Force.com Index
20/32
The time-dependent workflow cannot be
used if the Evaluation Criteria is set to
Every time a record is created or updated
Blacklistimg the member
When member fails to return book on
due dateCreate a workflow rule to blacklist the
member 48 hours after
the due date.
Improving productivity using automated
approval process
Creating a multi-step approval process
Approval actions
a)Submitted
b)Approved
c)rejected
d)Finally approved
e)Finally rejected
f)Recall action
Comparing workflow and Approval
Workflow Rules
Workflow rules are triggered immediately
and automatically after saving
Has a single set of criteria and action
Is completely automated
Types of logs
a)Debug logs
b)System logs
Debug logs:
Debug logs are stored separately and can
be retained
There is a limit of 2 MB per log and 50 MB
per organization.
Using the debug log:
-
8/10/2019 Force.com Index
21/32
System logs:
System logs record the overall system
processes happening at the moment
Categories of logsDatabase
Workflow
Validation
Callout
Apex code
Apex profiling
visualforce
system
Log levels in the system log consoleThe log levels are listed from lowest to
highest.
ERROR
WARN
INFO
DEBUG
FINE
FINER
FINEST
-
8/10/2019 Force.com Index
22/32
Validation rules are used to validate the data populated
in the field of a record.
Literal value,Field values,global value, function & operators
We define the validation rule and the condition for execution of the rule along with an error message
https://help.salesforce.com/htviewhelpdoc?err=1&id=fields_useful_field_validation_formulas.htm&siteLang=en_
If(TODAY()>BookIssueDate_c,TODAY()-BookIssueDate_c,0);
Return Date1(Date)=Issue_Date__c+15
Penalty amount(currency)=(TODAY()-Return_date_c)*Media_r.Loss_Fine-c)
The roll-up summary uses special functions such as SUM, MIN, MAX, and COUNT
The general library wishes to keep a track of the total media items issued to the customer. We wil create Media
issued(Rollup summary field on Master object using COUNT functionality)
A task is created for any user once the workflow is fired
We can also send an e-mail alert to reach recipients if the criteria are met
We can make an automatic field update after a certain criterion is met
https://help.salesforce.com/htviewhelpdoc?err=1&id=fields_useful_field_validation_formulas.htm&siteLang=en_UShttps://help.salesforce.com/htviewhelpdoc?err=1&id=fields_useful_field_validation_formulas.htm&siteLang=en_US -
8/10/2019 Force.com Index
23/32
workflow action is executed immediately the moment workflow rule is fired
An approval process can be of single step or multiple steps.
At every stage we have a different set of users to approve the record to move it to another level
Approval Rules
The record has to be sent for approvalmanually by clicking on Submit for
approval.
Is a multi-step process
Requires manual decision at every stage
They are stored based on particular users only
At a time only 20 logs are permitted per user
a)A workflow is not working the way it should be
b)There is no or a wrong field update
-
8/10/2019 Force.com Index
24/32
c)The approval process is not assigning it to the correct user
d)There is an error in the Apex trigger
They store the processes created by all the users
Formula field calculations not possible to view in the debug logs
-
8/10/2019 Force.com Index
25/32
For example, to check if the discount is
not greater than 35 percent
US
-
8/10/2019 Force.com Index
26/32
Data Management
Basics of data operations
a)Data export
b)Inserting data
c)Updating data
d)Deleting data
The importance of record IDs
The record ID is a unique identifier of the record
The record ID is similar to the primary ID and foreign
ID in a database table.
Force.com uses two types of IDs,
a)15 character ID
b)18 character ID
The 15-character ID is case sensitiveif we are to migrate data from the spread sheets
or export data to the spread sheets we have to use 18
character IDs
There are three ways of getting the record ID,
1)URL of the record detail page
2)by running the report on the object
3)Data Loader(API access)
Exploring the URL formatevery custom object will have fixed pattern which is
unique
Record ID
01I90000001EkeD
object identifier: O1I (first 3 char)
Record identifier:90000001EkeD
Relationships dependents first
-
8/10/2019 Force.com Index
27/32
customer media is junction object which connects
both customer and media, master detail relationship
to load the CustomerMedia we use:
1)Load customer object data
2)Load media object data
3)Finally load the Customermedia object data
Modifiable sysetm fields
Features of modifiable system fields
a)The fields can be modified only once in the lifetime
of the initial insert
b)They are accessible through API, that is, the data
loader
c)The fields are read-only for existing records
Connecting to Salesforce server through API
The CRUD commands
The full-form of CRUD is create, read, update, and
delete
>> The inserting process requires data to be inserted
without the ID because Force.com
generates the record ID when the record is created.
>>updating an existing record we need we need an ID
or an External ID during update
>>deleting command need ID of recoed to be deleted
Upsert:
Upsert is the combination of insert and update in a
single call
External IDs
When we are migrating data from other systems, it is
useful to have a foreign key to link data between the
two systems
Data loading tools
Cloud-based data import wizard
Cloud Import Wizard is a cloud-based tool and does
not require any download
We can load up to 50,000 records at a time
-
8/10/2019 Force.com Index
28/32
-
8/10/2019 Force.com Index
29/32
When we use the ID from theURL it is 15 characters
when we use the Data loaderwe get 18 character IDs
18 character ID is not case sensitive
Below pattern shows Candidate custom object address
bar(record ID)
https://ap1.salesforce.com/01I90000001EkeD
instance name :ap1
salesforce server url: salesforce.com
Record ID: 01I90000001EkeD
There will be a unique ID per
organization, no two records will have same ID
The first three characters of the record ID are the object
identifiers, which help us to identify the object of the record
The remaining characters are the unique record ID to identify
the record
https://ap1.salesforce.com/01I90000001EkeDhttps://ap1.salesforce.com/01I90000001EkeD -
8/10/2019 Force.com Index
30/32
Apex Data Loader
The Apex data loader is a .net utility used to upload data to the
organization which requires download
We can load more than 50,000 records
Data can be exported and mass deleted
-
8/10/2019 Force.com Index
31/32
It supports the CSV (Comma Separated Value) format
The data loader also runs on command line
We can also schedule the data loading at regular intervals
-
8/10/2019 Force.com Index
32/32
Analytics and Reporting
Displaying tabular data using Reports
Reports are tabular representation of large
amount of data
There are three types of custom reports:a)Tabular reports
2)Summary reports
3)Matrix reports