Академический Документы
Профессиональный Документы
Культура Документы
SFDC Notes
Salesforce study notes, tips and tricks!
Home 5.1- Describe the standard object architecture and relationship model
Admin Cert Notes All Objects in Salesforce are related, that is, there exist relations between Objects, for example, an Account can
have zero or more opportunities related to it, so the Account Object should be related somehow to the
0-Admin Introduction Opportunity Object .
To visualize the relation between Objects, we use ERD (Entity Relationship Diagram)
1–Organization Setup–1%
You can check all the di erent relations between Salesforce Objects in the Salesforce Data Models
2–User Setup–9% documentation: SF Data Models: https://developer.salesforce.com/docs/atlas.en-
us.api.meta/api/data_model.htm
3–Global User Interface–1% To better understand this concept, check out this excellent Video of ERD Tutorial for Beginners by Gina Baldazzi
8-Activity Management-3%
9-Chatter-1%
10-Data Management-11%
Also, check out this other Salesforce Video: Data Modeling for Non-Developers: An Intro
11-Content and Folder
Management-2% Object Relationship Types in Salesforce:
Meta
ERD: Entity Relationship Diagram:
Log in
What is Data Modeling?
Entries RSS
It is simply organizing your information properly.
Comments RSS
3 commandments of DM:
WordPress.org
Do not duplicate data – don store data in multiple places
You want the simplest structure possible while maintain integrity of info
Fields need to directly describe the objects that they are on: ex, email address in the Contact Object
Terminology:
Excel
Name Name SF Name Description Example
Entity instance Row Record each occurrence of the entity Walid’s Contact
One-to-Many One record is related to many records using a direct link, Account / Contact
a foreign key ek
ERD Entity Relationship Graphical representation all your objects how they are
Diagram related
Example:
Your company processes training for its products
Class Registration is tracked via Excel
Training is becoming bigger and more complex
Questions to ask:
What are the primary objects you want to track? Students and Classes
One-to-Many or many-to-many? Many-to-Many between students and
classes
How many objects you need? 3, 1 of the Junction Point
Where do your elds go? Check the Excel and arrange the elds as per
the tables. Status should go in the Junction Object as it describes the
Student / Class status
5.2- Explain how to create, delete, and customize elds, page layouts, and list views for custom and standard
objects
Object (and Tabs):
Manage Objects:
Create: Capture Info
Edit: change Object characteristics and behaviors
Delete: non-permanent removal of Object
Erase: permanent Removal
Undelete: recover object
Create a custom object.
Go to Build | Create | Objects – New Custom Object / Schema Builder
Give Label, Name and Plural Label, give the record name (name or number)
Deployed vs in development
Check the box launch new custom tab wizard to create a tab, or alternatively, you can
create a tab later on by going to Build | Create | Tabs
Tab exposes the Records within the Object to the users
Once created, you can edit it: change label, add elds, layouts,
You can delete custom Object, very hard to recover unlike eld
Field history tracking allows you to capture when the values within speci ed elds change when a record is
edited.
Use eld history tracking to create an audit trail of modi cations to your company’s critical data. This can be
particularly helpful in identifying instances where data was updated incorrectly and by whom.
Enable it:
Standard objects: Select “Set History Tracking” within its eld con guration
Custom Objects: Ensure the object properties have “Track Field History” enabled. Then
click “Set History Tracking” and select elds from the object
Once enabled, track the eld change by adding the eld history related list to the page layout
Note: Field history tracking will only track values for speci ed elds once enabled. Enabling history tracking or
adding additional elds will not yield any historical data
Fields longer than 255 characters (such as long text, rich text, and multi-select picklist elds) do not track values
when changed (only that a change has occurred).
You can track up to 20 elds per object by default (the limit can be raised by contacting Salesforce support, but
may impact record save time)
One to Many: Go to the child Object, in this case the Object that can have 1 of the
other: Object that has Crow foot attached to it — Classes.
Create a new eld on this Child Object, with type Lookup or Master-Detail to the
Parent Object (that will have the Related List at the bottom)
This way every master Object have one record of the other objec hence one to one relaship is established.
You can follow this link for more detail: http://www.infallibletechie.com/2013/05/how-to-create-one-to-one-
relationship.html
A roll-up summary eld calculates values from related records, such as those in a related list.
You can create a roll-up summary eld to display a value in a master record based on the values of elds in a
detail record. The detail record must be related to the master through a master-detail relationship. For example,
you want to display the sum of invoice amounts for all related invoice custom object records in an account’s
Invoices related list. You can display this total in a custom account eld called Total Invoice Amount.
Roll-up summary elds can be used within a master-detail relationship to summarize data contained within child
records. A maximum of 25 (10 prior to Winter 16 release) roll-up summary elds per object can be created.
It can also be used in:
Any custom object that is on the master side of a master-detail relationship
Any standard object that is on the master side of a master-detail relationship with a custom object
Opportunities using the values of opportunity products related to the opportunity (MDS)
Accounts using the values of related opportunities (Exercise in Certi edondemand)
Campaigns using campaign member status or the values of campaign member custom elds
The types of elds you can calculate in a roll-up summary eld depend on the type of calculation. For example,
Number, currency, and percent elds are available when you select SUM as the roll-up type.
Number, currency, percent, date, and date/time elds are available when you select MIN or MAX as the roll-
up type.
https://help.salesforce.com/HTViewHelpDoc?id= elds_about_roll_up_summary_ elds.htm&language=en_US
You can rename the Standard Tab and Labels, for example, rename Leads to
Prospects, this way this name will be re ected in the whole system.
Step 2 involves all the elds in the Lead Object, I can rename them 1 by 1
Once renamed, I can see that a tab has been renamed, and by whom. And Lead is now
Prospect
But in the left side setup menu, Lead is still named Lead.
Picklist vs Object.
Here are a few guidelines to help determine whether it is appropriate to use a picklist or custom object to capture
data:
Values are static or nearly static and they can be maintained by an Values change frequently
administrator Values can be added/changed by users
All selectable values are displayed at once (drop down menu) Selectable values can be searched for by users (lookup
Total number of values is relatively low (I’d suggest a maximum of 100, but dialog box)
the actual limits are much higher) The total number of values is high
You can to use controlling and dependent picklists (more details in the eld The value has associated data (e.g. the lead’s favorite
chapter) — this can be done to some extent with lookup lters (see Lookup brand is Dell; Dell’s address is X)
Filters) and a little bit of creativity, but the net result isn’t quite the same Values in this list are used in multiple references (e.g. the
The picklist value does not have any other associated data (e.g. the lead’s lead’s favorite brand is Dell; a marketing campaign is
favorite brand is Dell; no other information about Dell is needed) sponsored by Dell as well)
Values do not need to be validated via the API Values need to be validated via the API (useful for
Values are captured in web-to-lead submissions (web-to-lead does not support integrations)
custom relationship elds). You want to use delegated administration (see Delegated
You want to capture multiple values without creating multiple records (e.g. the Administration) on your custom object
lead’s favorite brands are X, Y,Z; use a multi-select picklist instead of a many to
many relationship)
Lookup Filters
Fields:
Create custom elds: Same way for both standard and custom Objects. What di ers is where to click for each.
For standard, go to: Build | Customize | Object Name | Fields
For Custom: Build | Create | Object – choose the Object name
Go to the Custom Fields &Relationship, click on New
Field Attributes:
Label: How the eld appears to users.
Name: How the eld is referenced programmatically and via the API.
Unique: Indicates that only one record within the object can have the speci ed value.
External ID: Used for data operations (upsert) referencing the primary key of an external system.
Default Value: Sets the default value for records created.
Required: Ensures the eld must have a value in order for a record to be saved.
By default, each object can have up to 7 (3 prior to Summer 14 Release) unique or external ID elds.
Field Types:
Auto Number: a unique sequence number generated for
every record. Read Only, The sequence can be controlled by
adding date elements and leading 0s.
Checkbox: True/1 for checked False/0 for not
Currency: enter a currency amount
Date: enter a date or pick it from a popup calendar
Date/Time: same, can also add current date/time
Email: validated, can’t be used for mass emailing
External Lookup Relationship: lookup links child to a parent external object from an external datasource.
Formula: automatically calculate values based on other values or elds
Geolocation: specify a location by its latitude and longitude. Counts 3 times against org limits
Hierarchical Relationship: Allows users to use a lookup eld to associate 1 user to another (like manager)
Indirect Lookup Relationship
Lookup Relationship: See above
Master-Detail Relationship: See above
Number: enter a number, any leading zeros are removed
Percent: will convert a number to percentage. 0.10 = 10%.
Phone: enter phone num, with US/Canada format if locale is US/Canada and digits is right. No validated,
Picklist: select a single value from a list that you de ne
Picklist (Multi-select): same as picklist, but multi-value
Roll-Up Summary: see above
Text: any string, You can set a maximum length, up to 255 characters
Text (Encrypted): You can set a maximum length of up to 175 characters. Use ASE 128-bit master keys. To
enable master encryption key management, contact Salesforce
Text Area: up to 255 characters that display on separate lines similar to a Description eld
Text Area (Long): up to 131,072 characters that display on separate lines
Text Area (Rich): With the use of a toolbar, users can format the eld content and add images and links
URL: When users click on the eld, the URL will open in a separate browser window. Can be encrypted.
Changing eld types (e.g. Date/Time to Date) can cause data loss
Most eld types are validated by Salesforce to the corresponding data type (e.g. you cannot enter an invalid email
address into an email eld, period). There are a few exceptions: picklist elds are not validated via the API, and
phone elds are not validated at all.
Some elds are not validated like: phone. User can type anything in this eld. But formatting is only applied when
phone typed through UI, user locale US/Canada, number of digits 10 or 11. If you want to make sure that proper
phones are entered, use Validation Rules.
Partial validation like Picklist and Picklist multi-selection: only validated in the UI (can only enter the picklist value),
but not the API. You can push any value in API.
Controlling and Dependent elds: picklist values can be displayed dynamically based on the value of another
eld. For example, if you choose a country with a picklist, the second picklist can only display the cities of this
country:
Continent is the controlling eld of country
Country is the dependent eld of continent and
controlling eld of city
City id the dependent eld of country
5.3- Given a scenario, determine the appropriate elds and page layouts for custom and standard objects
Based on the above, you can now determine the appropriate elds and page layouts for di erent objects.
5.4- Explain how to create, delete, and customize record types for custom and standard objects
From Video 9: Record Type is the ability to gather data in di erent ways on the same object (ex. Internal/External
Case), each with di erent elds and process. Record types allow an Admin to
con gure di erent page Layouts, Business Processes and Picklist values to di erent
users based on their pro les, or to the same user with many RT options.
1. Before, go to the eld that you want to add picklist values for: Build | Customize |
Case | Fields | Status | Case Status Picklist Values – add the picklist values
2. Go To Support Processes: Cases | Support Processes – New – name it internal – Select
the picklist values for the Case Status for this Internal Process
Go To Support Processes: Cases | Support Processes – New – name it external –
Select the picklist values for the Status for external process
3. Page Layout: internal layout rst: Cases | Page Layout | name it internal and
base it on the existing layout | add the elds you want and remove elds that are not needed. (Before 2,
make sure you created any custom elds you might need in either Record Types)
4. Finally, create the Record Type itself: Cases |Record Types – New – select the Support Process and Pro les
that will use it – next – select the page layout for each Pro le
IMPORTANT: After creating Record Type, you can edit picklist values to
any pickist eld (other than status and Stage, which are the Process).
Finally, add the “Case Record Type” to both pages layouts for the user
to know which type he is having. Now when the pro le user wants to
open a new case, he gets the options on the screenshot! Note that the
description that you put appears here!
The main RT is called Master RT. And all Records that existed before
cresting any RT are part of this Master RT.
Can also remove Lookup elds that allow Related list (bottom section)
You can Edit Record Types assignment in the User | Pro les or
Permission Sets.
A user can see Master RT, or RT1/RT2.
Record types do not in uence record-level security by default. However, they can referenced in sharing rules.
5.5- Given a scenario, determine the appropriate record types and business processes for custom and
standard objects
When you need di erent picklist values based on another elds: no need for RT, use eld controlling/dependent
When you need di erent picklist value based on profuiles: RT is needed
When you need di erent layout based on di erent pro les: RT is not needed, this can be done through Pro le
5.8- Extra Notes
Person Account:
Salesforce mainly uses Business accounts, which are used to store information about companies
On the other hand, Person accounts provide a way to represent an individual as both a contact and an account in
Salesforce, and are frequently used to facilitate business-to-consumer (B2C) relationships.
They are used to store information about individual people. For example, online shoppers, gym members,
vacation travelers, or other individual consumers.
They can’t have contacts. Instead, the it stores the information you’d typically save for business contacts
You can treat a person account like a contact: invite a person account to a meeting, associate it with campaign
Enabled via feature request (raising a case with Salesforce).
5 Comments
OSCAR
November 22, 2016 at 11:50 pm
Hi Walid El Hor,
In section “5.4- Explain how to create, delete, and customize record types for custom and standard objects”, you talk about the “video
9”. Could you add the link, please?.
Thank you very much for share all this information!. It is being very usefull for me.
Walid El Horr
November 24, 2016 at 3:23 pm
Oh, my mistake. This was from the Security chapter “Who Sees What” Salesforce video series. I xed it, and here is the link of
the whole series. The record type is the last video in the series:
https://www.youtube.com/watch?list=PL6747B4DAE356E17C&v=jDYfTfaqclk
Bilquis Shaikh
April 29, 2017 at 7:52 pm
Anonymous
July 31, 2018 at 5:13 pm
CJ
November 21, 2018 at 12:26 am
Leave a comment
Your email address will not be published.
Name
Website
Post Comment