ποΈ
Object Architecture, Fields, and Lightning App Builder
Object relationships, custom fields, and UI design with Lightning App Builder.
β±οΈ Estimated reading time: 30 minutes
Mastering Objects and Schema Builder
Objects are the backbone of Salesforce.
- Standard Objects: Cannot be deleted. Admins can change their labels (Rename Tabs and Labels), but the API name remains the same.
- Custom Objects: Have features you must opt-in to: 'Allow Reports', 'Allow Activities', 'Track Field History'.
Schema Builder: Not just for visualization; it's an admin tool that allows real-time creation of objects and fields. Exam Note: Fields created here are NOT automatically added to Page Layouts; you must do that manually afterward.
- Standard Objects: Cannot be deleted. Admins can change their labels (Rename Tabs and Labels), but the API name remains the same.
- Custom Objects: Have features you must opt-in to: 'Allow Reports', 'Allow Activities', 'Track Field History'.
Schema Builder: Not just for visualization; it's an admin tool that allows real-time creation of objects and fields. Exam Note: Fields created here are NOT automatically added to Page Layouts; you must do that manually afterward.
π― Key Points
- β Difference between 15-character ID (case-sensitive, used in UI) and 18-character ID (case-insensitive, used in API)
- β Undelete: Deleted objects stay in the recycle bin for 15 days
- β External Objects: Access data outside Salesforce without using storage
- β Custom objects always include the '__c' suffix
Relationships: Master-Detail, Junction, and Hierarchy
Relationships define data flow and security.
- Master-Detail: The parent controls visibility. If the parent is deleted, children are deleted (Cascade Delete). Reparenting: Not allowed by default unless you check 'Allow Reparenting' on the field.
- Junction Objects: Create M:M (Many-to-Many) relationships. An object with two Master-Detail relationships (e.g., Candidates and Jobs linked by 'Application').
- Hierarchical Relationship: Only exists on the User object to create manager hierarchies.
- Master-Detail: The parent controls visibility. If the parent is deleted, children are deleted (Cascade Delete). Reparenting: Not allowed by default unless you check 'Allow Reparenting' on the field.
- Junction Objects: Create M:M (Many-to-Many) relationships. An object with two Master-Detail relationships (e.g., Candidates and Jobs linked by 'Application').
- Hierarchical Relationship: Only exists on the User object to create manager hierarchies.
π― Key Points
- β An object can have a maximum of 2 Master-Detail relationships
- β You cannot create a Master-Detail relationship if the object already has records (hack: create Lookup, fill data, convert to M-D)
- β Lookup: Field can be optional or required; does not affect record Owner
- β Roll-up Summary: Only available on the Master object of an M-D relationship
Field Types and Data Conversion
Salesforce has specific field types with critical conversion rules.
- External ID: Unique field used to import data from external systems (max 25 per object).
- Formula Fields: Automatic calculations. Cannot be edited. Can use data from parent objects (Cross-object formulas).
- Conversion: Changing from 'Checkbox' to 'Text' is safe. Changing from 'Text' to 'Picklist' may cause data loss if values don't match.
- External ID: Unique field used to import data from external systems (max 25 per object).
- Formula Fields: Automatic calculations. Cannot be edited. Can use data from parent objects (Cross-object formulas).
- Conversion: Changing from 'Checkbox' to 'Text' is safe. Changing from 'Text' to 'Picklist' may cause data loss if values don't match.
π― Key Points
- β Roll-up Summary: Supported types: COUNT, SUM, MIN, MAX
- β Geolocation: Stores latitude and longitude as a single field
- β Auto-number: Generates custom sequential IDs (e.g., INV-001)
- β If you convert a Master-Detail field to Lookup, you lose the Roll-up Summary fields
Record Types, Path, and Layouts
Record Types are the primary tool for process segmentation.
Logical Exam Flow:
1. Create the Business Process (sales/support stages).
2. Create the Record Type and assign the process to it.
3. Assign the Page Layout to the Record Type and User Profile.
Path: Visual tool in Lightning to guide users through process stages. You can add 'Key Fields' and 'Guidance for Success' for each stage.
Logical Exam Flow:
1. Create the Business Process (sales/support stages).
2. Create the Record Type and assign the process to it.
3. Assign the Page Layout to the Record Type and User Profile.
Path: Visual tool in Lightning to guide users through process stages. You can add 'Key Fields' and 'Guidance for Success' for each stage.
π― Key Points
- β A Record Type controls: Picklist values, Page Layouts, and Business Processes
- β For standard objects like Accounts or Contacts, you do NOT need to create a pre-process
- β Admins can assign Record Types via Profiles or Permission Sets
- β If a user only has access to one Record Type, Salesforce won't prompt them to choose one when creating a record
Lightning App Builder and FlexiPages
The Lightning App Builder creates 'FlexiPages'.
Assignment Levels (Hierarchy):
1. Org Default: What everyone sees if nothing more specific is set.
2. App Default: Overrides Org Default for a specific app (e.g., Sales App).
3. App, Record Type, and Profile: The most granular and powerful level.
Dynamic Forms: Allow field-level conditional visibility. This eliminates the need to create dozens of Page Layouts just to hide fields based on record status.
Assignment Levels (Hierarchy):
1. Org Default: What everyone sees if nothing more specific is set.
2. App Default: Overrides Org Default for a specific app (e.g., Sales App).
3. App, Record Type, and Profile: The most granular and powerful level.
Dynamic Forms: Allow field-level conditional visibility. This eliminates the need to create dozens of Page Layouts just to hide fields based on record status.
π― Key Points
- β Dynamic Actions: Allow showing buttons (e.g., 'Close Case') based on logical criteria
- β Analytics Components: You can embed reports directly onto a record page
- β Mobile Compatibility: You can preview how the page looks on phones and tablets
- β Rich Text Component: Used to display warnings or visual instructions on the page