Data model in salesforce

10,717 views

Published on

This presentation is based on the Data model of Salesforce platform. I prepared this presentation for the DEV 401 certification discussion at Sabre Technologies.

Published in: Technology
0 Comments
13 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
10,717
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
495
Comments
0
Likes
13
Embeds 0
No embeds

No notes for slide
  • 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.
  • 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.
  • 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.
  • Data model in salesforce

    1. 1. Data Model in Salesforce Chamil Madusanka Software Engineer (Force.com) Twitter: @chamilmadusanka
    2. 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. 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. 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. 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. 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. 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. 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. 9. Many-to-Many relationship Two Master-Detail Relationships Required 3rd object called junction object
    10. 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. 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. 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
    13. 13. 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
    14. 14. Thank You & Good Luck

    ×