2. Object Fields Relationship Flashcards
What is an Object on the Salesforce Platform?
Objects are analogous to database tables (records), but also include page layout (customize layout) and validation layer (enforces consistency)
What are records on the Salesforce Platform?
They are analogous to instances of the object (columns)
What are the types of objects on the lightning platform?
Standard Objects: objects provided for you out of the box
They come with a predefined set of standard fields
Custom Objects: created by you to extend the data model
System Objects: keep track of things going on other the hood such as who has access to what record, which instance of the object,
What is the Salesforce Data Model?
architectural structure used for storing data in an application that includes:
- standard objects
- standard relationship between those objects (one-to-many, one-to-one, many-to-many)
What is the most important field we have in our objects?
Most important field is the standard record id field which we get on every object whether standard or custom.
What is the Salesforce ID?
It is a primary key that uniquely identifies each record. It comes in two forms 15 and 18 character.
- 15-character is case sensitive
- 18-character is case insensitive
What has 15 char ID what has 18 char ID?
URL, List View, SOAP API, APEX, Visualforce: 18 character
Report, Formula: 15 character
What is the role of the standard field “name”?
It gives a short description to identify a record’s content (text or auto-num)
What is the role of the standard field “owner”?
Refers to the user or queue of a specific record. The owner is granted additional privileges (access)
What is the role of the standard field “Created/Last Modified/Date”?
Created By or Last Modified By - references the user
Crated Date or Last Modified Date - is the date/time record
What is the difference between field labels and names?
The system will automatically create the name of the label once you give a value to the name. It will be the name of the name with ”__c” attached to the end of it.
Additionally, labels cannot have any white spaces so any white spaces in the name will be replaced with “_” (underscores).
ex. Sales Force -> Sales_Force__c
What are some of the field types?
Numeric Data Types
Checkbox/picklist
Formatted text data types (email, phone number, URL)
Calendar Data Types - Date or Time
Text Data Types - Text, Text Area,
Encrypted
Calculation Data Types - Auto Number, Formula, Roll-Up Summary
What are some field attributes?
Description - description of the field
Help Text - text displayed when user hover over info icon
Required - checkbox that requires a value in order to save record
Unique - checkbox that enforce uniqueness across records
External ID - checkbox that indicates that the field is a key from an external system
Default Value - value used to pre-populate field data
What is field dependency?
The values in the dependent picklist will vary based on the value of the controlling field.
“controlling picklist” + “dependent picklist” or “checkbox” + “dependent picklist”
What are Global picklists?
Global picklist are picklists that can be used for various picklists. Not only does this increase reusability, but also enforces consistency and scalability.
What is the difference between Primary Key and Foreign Key?
PK is unique and required
FK points to the primary key in the parent table (links one table to another)
What is a Master-Detail Relationship?
Access to a detail is inherited from the master record. Detail side must be a custom object.
Cascading delete
Access to the detail record is inherited based on access to the master record (includes ownership -> the owner of the master record is automatically the owner of the detail record)
Limitations - can’t be created on standard objects, no more than two master-detail relationship fields on a custom object, no more than three consecutive master-detail-relationship)
Roll-up summaries -
What is a Lookup Relationship?
Child record and parent record have independent sharing.
Child still exists even if parent is deleted.
What is the difference between Master-Detail and Lookup relationship field?
What are the functions of lookup filters?
Allows us to specify specific characteristics of parent records that are required for them to be available to use as parents for our particular child record.
What is a self relationship?
A self relationship is when you use a lookup relationship to relate to itself
Example: we have a field on account which is parent account that allows us to choose any account for being a parent account of an existing one.
What is a hierarchy relationship?
Relationship between User object and itself.
In Salesforce, only a user object has this type of relationship where we can create a hierarchy of users in the organization. For example, a user can have his manager, and his manager may have a senior manager, and so on till the CEO or CIO level.
What is a junction object?
It is a custom child object with two master detail-relationship.
It allows you to model a “many-to-many” relationship between two objects.
What is an external object?
Similar to custom object but maps to external DB’s. Data outside of Salesforce is accessed via Salesforce Connect.
What is Salesforce Connect?
Data integration tool that connects external data and gives it native platform ability inside Salesforce.
Benefits of Salesforce Connect
Data accessed in real time (not stored or copy into salesforce)
Data is always fresh
You can create a related list with external data
What are the two types of external object relationship?
Indirect lookup relationships
External lookup relationships
What is a indirect lookup relationship?
An indirect lookup relationship allows us to link an external object to a standard or custom object.
What is a external lookup relationship?
External lookup relationship allows us to link an external object to a parent external object whose data is stored in an external data source.
In other words, it allows us to link two external objects.
What is a schema builder?
It is a graphical tool that lets you use drag and drop to view, create and modify objects, fields, and relationships.