SlideShare a Scribd company logo
1 of 14
Data Model in Salesforce

Chamil Madusanka
Software Engineer (Force.com)
Twitter: @chamilmadusanka
Object In Salesforce
Object
Equal to Database Table

Standard
Predefined/CRM Related

Custom
Defined by Developer

Fields
Equal to Database Table
column

Standard
Automatically Created

Custom
Defined by Developer
Object Fields In Salesforce
Standard Fields
System Assigned but can be initialized during record
creation

Indexed
System
Assigned/Not
Updatable

Required

Referred to User/ User Group

Name

Created
By

ID

User
Assigned
Modifiable

Owner

System
Generated
Not
Modifiable

Unique
Text

Auto Number

Last
Modified
By

Date Time
Created
Date

Last
Modified
Date
Custom Fields in Salesforce
Numeric

Calendar

Number
Date

Limited
Required
Option

Formatted

Check
Box

Email

Text

Calculation

Text

Auto
number

Text Area
(Long)
Currency

Pick List

Phone

Formula

Text Area
(Rich)
Date time
Percent

Pick
List(Multi
select)

URL

Encrypted

Roll-up
Summary
Field Dependancies

Field
Dependency

Can be made dependent
among two fields

Controlling
Field
Maximum number

of values allowed in
Pick List/Check
controlling field is
300

Box

Dependent
Field

Custom Pick List
Object Relationships
Relationships
Parent-to-Child
Relationship

Lookup

Master-Detail

Loosely Coupled

Tightly coupled

No Cascade

Cascade

Independent
ownership and
sharing

Inherited
ownership and
sharing

Self
lookup
relationship to
itself

Hierarchy
Only in User Object

Many-ToMany

Using Junction
Object+2 MasterDetail
Master-Detail Relationship
Master=Parent | Detail=Child
Standard objects can't be on the detail side
don't exceed 10,000 child records for a master-detail relationship

Undeleting the master record also undeletes detail and subdetail records
To create multilevel master-detail relationships, you need the "Customize Application"
user permission.
up to three custom detail levels
Comparison of Object Relationships
Lookup Relationship

Master-detail Relationship

Coupled

Loosely

Tightly

Child field value

Optional

Required

Cascade Delete

No

Yes

Ownership & sharing

Independent

Inherited from parent

Maximum relationship per
object

25

2

Roll-up summary in parent
supported

No

Yes

Multiple Layers

Yes

Yes (Depend the number
on the object is Standard
or Custom)
Many-to-Many relationship
Two Master-Detail Relationships
Required 3rd object called junction object
Junction Object
cannot become the master object in a multilevel master-detail relationship
workflow rules and approval processes are allowed
Outbound messages no allowed
Inherits sharing from both masters
cannot delete a parent record if there are more than 200 junction object records AND
if the junction object has a roll-up summary field that rolls up to the other parent.
1st M-D  Primary Relationship
2nd M-D  Secondary Relationship
On both master objects
Roll-up summary fields that summarize data from the junction object can be created
Formula fields , validation rules on the junction object can reference fields
Lookup Filters
Limit the Search result for users
Create on lookup, master-detail and hierarchical fields
Compare fields to static value or to other field
Can be required
Define informational messages
Quick Revision
• What is a custom object?
– User Defined objects

• List example of custom field types.
– Text, Number, email, URL, pick
list, checkbox, phone, currency, percent. Auto number

• List the 4 types of custom relationships that can be built on
force.com platform. Describe the differences of them.
–
–
–
–

Lookup
Master-Detail
Self
Many-to-many

• What are the two types of lookup filter?
– Value
– Field
Reference
• https://na12.salesforce.com/help/doc/en/rela
tionships_considerations.htm
• https://na12.salesforce.com/help/doc/en/rela
tionships_manytomany.htm#CJOIntro
• http://www.forceprepare.com/tutorial/object.
html
Thank You
&
Good Luck

More Related Content

What's hot

What's hot (20)

Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platform
 
Salesforce admin training 1
Salesforce admin training 1Salesforce admin training 1
Salesforce admin training 1
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce Presentation
 
Salesforce complete overview
Salesforce complete overviewSalesforce complete overview
Salesforce complete overview
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
Endless Use Cases with Salesforce Experience Cloud by Dar VeverkaEndless Use Cases with Salesforce Experience Cloud by Dar Veverka
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
 
Salesforce Communities
Salesforce CommunitiesSalesforce Communities
Salesforce Communities
 
Salesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce IntroductionSalesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce Introduction
 
How to create a developer org for salesforce
How to create a developer org for salesforceHow to create a developer org for salesforce
How to create a developer org for salesforce
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We Do
 
Top Benefits of Salesforce in Business
Top Benefits of Salesforce in BusinessTop Benefits of Salesforce in Business
Top Benefits of Salesforce in Business
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce security
 
Salesforce Sales Cloud: Best Practices to Win More Deals
Salesforce Sales Cloud: Best Practices to Win More DealsSalesforce Sales Cloud: Best Practices to Win More Deals
Salesforce Sales Cloud: Best Practices to Win More Deals
 
Salesforce PPT.pptx
Salesforce PPT.pptxSalesforce PPT.pptx
Salesforce PPT.pptx
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
 
Salesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demoSalesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demo
 
Record sharing model in salesforce
Record sharing model in salesforceRecord sharing model in salesforce
Record sharing model in salesforce
 
Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...
Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...
Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...
 

Similar to Data model in salesforce

Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
Nathaniel Palmer
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
Nathaniel Palmer
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
brendonschwartz
 
Eugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field TypesEugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field Types
SharePoint Saturday NY
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
dreamforce2006
 
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
David Blumentals
 

Similar to Data model in salesforce (20)

SugarCRM Power Hour with Jeff Bickart; Module Builder and Studio a developers...
SugarCRM Power Hour with Jeff Bickart; Module Builder and Studio a developers...SugarCRM Power Hour with Jeff Bickart; Module Builder and Studio a developers...
SugarCRM Power Hour with Jeff Bickart; Module Builder and Studio a developers...
 
April 8th: Module Builder & Studio
April 8th: Module Builder & StudioApril 8th: Module Builder & Studio
April 8th: Module Builder & Studio
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
 
SFDC Database Basics
SFDC Database BasicsSFDC Database Basics
SFDC Database Basics
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
 
Salesforce admin training 3
Salesforce admin training 3Salesforce admin training 3
Salesforce admin training 3
 
TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010
 
What is force.com?
What is force.com?What is force.com?
What is force.com?
 
Dublin Core In Practice
Dublin Core In PracticeDublin Core In Practice
Dublin Core In Practice
 
Common Data Service – A Business Database!
Common Data Service – A Business Database!Common Data Service – A Business Database!
Common Data Service – A Business Database!
 
19 09-26 source reconfiguration and august release features
19 09-26 source reconfiguration and august release features19 09-26 source reconfiguration and august release features
19 09-26 source reconfiguration and august release features
 
Common Data Model - A Business Database!
Common Data Model - A Business Database!Common Data Model - A Business Database!
Common Data Model - A Business Database!
 
SharePoint Jumpstart #2 Making Basic SharePoint Search Work
SharePoint Jumpstart #2 Making Basic SharePoint Search WorkSharePoint Jumpstart #2 Making Basic SharePoint Search Work
SharePoint Jumpstart #2 Making Basic SharePoint Search Work
 
Eugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field TypesEugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field Types
 
Certified Data Architecture and Management Designer : MDM and Metadata Manage...
Certified Data Architecture and Management Designer : MDM and Metadata Manage...Certified Data Architecture and Management Designer : MDM and Metadata Manage...
Certified Data Architecture and Management Designer : MDM and Metadata Manage...
 
Customizing Ranking Models for Enterprise Search: Presented by Ammar Haris & ...
Customizing Ranking Models for Enterprise Search: Presented by Ammar Haris & ...Customizing Ranking Models for Enterprise Search: Presented by Ammar Haris & ...
Customizing Ranking Models for Enterprise Search: Presented by Ammar Haris & ...
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
 
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
 
Punta Dreaming by Luciano Straga #pd17 - Punta del Este, Uruguay
Punta Dreaming by Luciano Straga #pd17 - Punta del Este, UruguayPunta Dreaming by Luciano Straga #pd17 - Punta del Este, Uruguay
Punta Dreaming by Luciano Straga #pd17 - Punta del Este, Uruguay
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Data model in salesforce

  • 1. Data Model in Salesforce Chamil Madusanka Software Engineer (Force.com) Twitter: @chamilmadusanka
  • 2. Object In Salesforce Object Equal to Database Table Standard Predefined/CRM Related Custom Defined by Developer Fields Equal to Database Table column Standard Automatically Created Custom Defined by Developer
  • 3. Object Fields In Salesforce Standard Fields System Assigned but can be initialized during record creation Indexed System Assigned/Not Updatable Required Referred to User/ User Group Name Created By ID User Assigned Modifiable Owner System Generated Not Modifiable Unique Text Auto Number Last Modified By Date Time Created Date Last Modified Date
  • 4. Custom Fields in Salesforce Numeric Calendar Number Date Limited Required Option Formatted Check Box Email Text Calculation Text Auto number Text Area (Long) Currency Pick List Phone Formula Text Area (Rich) Date time Percent Pick List(Multi select) URL Encrypted Roll-up Summary
  • 5. Field Dependancies Field Dependency Can be made dependent among two fields Controlling Field Maximum number of values allowed in Pick List/Check controlling field is 300 Box Dependent Field Custom Pick List
  • 6. Object Relationships Relationships Parent-to-Child Relationship Lookup Master-Detail Loosely Coupled Tightly coupled No Cascade Cascade Independent ownership and sharing Inherited ownership and sharing Self lookup relationship to itself Hierarchy Only in User Object Many-ToMany Using Junction Object+2 MasterDetail
  • 7. Master-Detail Relationship Master=Parent | Detail=Child Standard objects can't be on the detail side don't exceed 10,000 child records for a master-detail relationship Undeleting the master record also undeletes detail and subdetail records To create multilevel master-detail relationships, you need the "Customize Application" user permission. up to three custom detail levels
  • 8. Comparison of Object Relationships Lookup Relationship Master-detail Relationship Coupled Loosely Tightly Child field value Optional Required Cascade Delete No Yes Ownership & sharing Independent Inherited from parent Maximum relationship per object 25 2 Roll-up summary in parent supported No Yes Multiple Layers Yes Yes (Depend the number on the object is Standard or Custom)
  • 9. Many-to-Many relationship Two Master-Detail Relationships Required 3rd object called junction object
  • 10. Junction Object cannot become the master object in a multilevel master-detail relationship workflow rules and approval processes are allowed Outbound messages no allowed Inherits sharing from both masters cannot delete a parent record if there are more than 200 junction object records AND if the junction object has a roll-up summary field that rolls up to the other parent. 1st M-D  Primary Relationship 2nd M-D  Secondary Relationship On both master objects Roll-up summary fields that summarize data from the junction object can be created Formula fields , validation rules on the junction object can reference fields
  • 11. Lookup Filters Limit the Search result for users Create on lookup, master-detail and hierarchical fields Compare fields to static value or to other field Can be required Define informational messages
  • 12. Quick Revision • What is a custom object? – User Defined objects • List example of custom field types. – Text, Number, email, URL, pick list, checkbox, phone, currency, percent. Auto number • List the 4 types of custom relationships that can be built on force.com platform. Describe the differences of them. – – – – Lookup Master-Detail Self Many-to-many • What are the two types of lookup filter? – Value – Field

Editor's Notes

  1. Fields of two Picklists can be made dependent on each other. As an example consider an application with customers in US and Canada. If there are two picklists - one for country and the other for state. Based upon user's selections of country, the state settings need to get updated. This is implemented by defining controlling and dependent picklists. In the above scenario, country becomes the controlling picklist and state becomes dependent picklist. The controlling and dependent picklists are defined using "Field Dependency" button in "Custom Field and Relationship" section.
  2. There are a two types of object relationships that Salesforce supports - Lookup relationship - Master-detail relationshipThese relationships are used to implement one-to-many relationship. They are created as fields in the child record. As an example in a recruitment application if one applicant can have many interviewFeedbacks, we could create a lookup (or master detail) relationship in the interviewFeedback object pointing to the applicant object. In Master Detail relationship, if the parent record is deleted, then all its children records are deleted. Child records in master-detail relationship do not have owners. They inherit ownership from the parent record.In Master detail relationship, the parent field is required. Also the parent field once specified cannot be changed.Standard Object cannot be on detail side of Master-Detail relationship.
  3. The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records: Look and feel: The junction object's detail and edit pages use the color and any associated icon of the primary master object.Record ownership: The junction object records inherit the value of the Owner field from their associated primary master record. Because objects on the detail side of a relationship do not have a visible Owner field, this is only relevant if you later delete both master-detail relationships on your junction object.Division: If your organization uses divisions to segment data, the junction object records inherit their division from their associated primary master record. Similar to the record ownership, this is only relevant if you later delete both master-detail relationships.The second master-detail relationship you create on your junction object becomes the secondary relationship. If you delete the primary master-detail relationship or convert it to a lookup relationship, the secondary master object becomes primary.