Objects
Trailhead provides a really nice overview of Salesforce Custom and Standard Objects and how they are structured https://developer.salesforce.com/trailhead/force_com_introduction/data_modeling/objects_intro.
Setting up an Object
The minimum steps required to set up an Object.
- Create the Object, name it
- Set the Name field on the object - eg Auto Number
- Set the details on the Object
- Allow Reports
- Allow Activities (optional)
- Track Field History
- Set Deployed
- Allow Search
- Create Tab
- Create the Tab for this Object
- Decide who should access the Tab
- Decide which App the Tab should be in - HINT! NOT ALL OF THEM!
- Optional - Create Record Types
- Add the Fields to the Object
- Include Help Text
- Set correct Permissions as you are creating the field
- Include Lookup or MD fields to other objects.
- Remember to set the Lookup Filters if required.
- Edit the Page Layout to ensure that all the fields are visible and in the right location
- Make the Section header visible for System Fields
- Ensure required fields are required.
- Add Files and Notes related list (if you are using them).
- Add Object History related list
- Override the Salesforce Mobile and Lightning Experience Actions
- Set the exact Actions you want to appear on the Object
- Optional - Create other Page Layouts if required for other Record Types
- Optional - Create a Create Record Action from a related Object
- Ensure the Layout is correct with all the required fields required for Creating the record
- Optional - Create an Update Record Action for this object so records can be bulk updated from the list view
- Create the Compact Layout and assign it to the Page Layout
- Set the Search Layouts - IMPORTANT!
- If there are any buttons to add to the List View, then add them
- Optional - add any Validation Rules
- Set permissions on Object
- Optional - Set Record Types defaults
- Enable Feed Tracking for the Object
- Look at the Object, create a Test Record.
- Edit the Lightning Page. See Lightning Record Pages
- Chatter first
- Delete Related
- Add Related List Quick Links IF there are related lists.
- Add Files as a Related List under Chatter.
- Activate Page - Assign as Org Default.
- Go to the Tab
- Edit the All View
- If there are any Record Types, create a View for each Record Type
- (Ensure you go back to Classic if this will be in Communities to ensure Communities users can't see Inappropriate Views).
Fields
This video from Trailhead is a really good overview of creating fields https://www.youtube.com/watch?v=j95gONjVNFU#t=11
- The most annoying thing about fields is not seeing ALL fields in alpha order - so have a good idea of what are the custom and standard fields in your org.
- Also see each object below for the standard fields that are not set as visible by default, which is kinda annoying (eg Contacts).
- The most important thing about fields is the security https://help.salesforce.com/HTViewHelpDoc?id=admin_fls.htm
Relationships
Trailhead has a good overview of Relationships https://developer.salesforce.com/trailhead/force_com_introduction/data_modeling/object_relationships
Remember, Master Detail relationships are great, but you can always use triggers, or Rollup Helper to create calculated fields if you don't have a Master Detail relationship.