Sei sulla pagina 1di 10

Salesforce Development Curriculum

Developed by David Liu (​sfdc99.mailbag@gmail.com​) 


 
By the end of this course, students will know how to write Apex triggers and test classes that 
are professional-grade, bulkified, and SOQL enhanced. Students also will have an elementary 
level knowledge of object oriented coding, Visualforce, and Lightning components. 
 
Pre-requisites: 
● Salesforce Administrator Certification (ADM 201) or equivalent experience 
● Prior coding and/or technical skills are NOT required 
 
Some of the tutorials are from the ​Apex Academy​ and thus require a p
​ aid subscription​. I care 
more that you learn Apex than I do making extra money, so I’ve included alternate free tutorials. 
You can also email me with a flattering message to r​ equest a scholarship​. I do my best to help! 
 
Note: U​ sing Lightning Experience is highly recommended! 
 
Week 1: Introduction

Week 2: Intro to Apex Triggers

Week 3: Intro to Test Classes

Week 4: Variables and Collections

Week 5: IF Statements, Loops, and More

Week 6: Putting It All Together

Week 7: Introduction to SOQL

Week 8: Using SOQL in Apex

Week 9: Using SOQL in Test Classes

Week 10: Reinforcing Key Concepts

Week 11: Scaling Your Code, Part 1

Week 12: Scaling Your Code, Part 2

Week 13: Objects

Week 14: Introduction to Visualforce

Week 15: Introduction to Lightning Components

Final Project
Closing Thoughts

Update Log:
 
 

Week 1: Introduction 
 
Learn the different types of coding languages available on the Salesforce Platform and their use 
cases. Also, learn how to use your Integrated Development Environment (IDE) to code.  
 
1. Trailhead Module: P ​ latform Development Basics 
a. Estimated Time: 65 mins 
2. Trailhead Module: D ​ eveloper Console Basics 
a. Estimated Time: 85 mins 
3. Trailhead Module: D ​ ata Modeling 
a. Estimated Time: 45 mins 
 

Week 2: Intro to Apex Triggers 


 
Time to get your hands writing your first triggers! 
 
Note:​ Please use the Developer Console instead of MavensMate. Revisit section #2 from Week 
1 if you need a refresher. 
 
1. Apex Academy #1​: What’s in it for Me 
a. Estimated Time: 15 mins 
2. Apex Academy #1​: Introducing Apex 
a. Estimated Time: 30 mins 
3. Apex Academy #1​: Writing Basic Apex Triggers 
a. Estimated Time: 45 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 1.1​: What is a Salesforce Trigger? 
b. Chapter 1.2​: Where to write code in Salesforce 
c. Chapter 1.3​: How to write an Apex trigger 
 
Don’t forget to create a ​brand new developer org​ to do the homework in! 
 
Homework: W ​ rite a trigger that automatically changes a Contact’s email address to 
“hello@world.com” whenever a Contact is created. Verify it works! 
 
Extra Credit: W
​ rite a trigger that automatically creates an Account whenever a Lead is created. 
The Account must be named after the last name of the Lead. 
 

Week 3: Intro to Test Classes 


 
Learn how to write test classes and why they are important on the Salesforce platform. 
 
1. Apex Academy #1​: Writing Test Classes 
a. Estimated Time: 45 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 1.4​: How to write a test class 
 
Homework: W ​ rite a test class for the trigger in Week #2’s homework. Make sure the trigger 
achieves 100% code coverage. 
 
Extra Credit:​ Write a test class for the trigger in Week #2’s extra credit. Make sure the trigger 
achieves 100% code coverage. 
 

Week 4: Variables and Collections 


 
Learn how to use variables and collections, the fundamental building blocks of Salesforce coding. 
All code you write will build on top of these concepts. 
 
1. Apex Academy #2​: Course Overview 
a. Estimated Time: 5 mins 
2. Apex Academy #2​: Course Introduction 
a. Estimated Time: 10 mins 
3. Apex Academy #2​: Variables and Collections 
a. Estimated Time: 60 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 3.1​: Variables 
b. Chapter 3.2​: Collections 
 
Homework: W ​ rite a trigger that creates two identical Contacts whenever an Account is created. 
Make sure both Contacts are associated with the Account. Use any values for the fields on the 
Contacts - just make sure to use variables when populating the fields of each Contact to make 
sure they are identical. 
 
Extra Credit:​ Write a test class for the above trigger! 
 

Week 5: IF Statements, Loops, and More 


 
Finish learning about the fundamental tools used in Salesforce coding. 
 
1. Apex Academy #2​: IF Statements, Loops, and More 
a. Estimated Time: 60 mins 
2. Apex Academy #2​: Apex Trigger Demos 
a. Estimated Time: 50 mins 
3. Apex Academy #2​: Apex Test Class Demos 
a. Estimated Time: 30 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 3.3​: Dot notation – navigating relationships and using methods 
b. Chapter 3.4​: Loops – FOR and FOREACH loops 
c. Chapter 3.5​: Comparison Operators 
d. Chapter 3.6​: IF statements 
e. Chapter 3.7​: Creating, updating, and deleting records 
 
Homework: W ​ rite a trigger that creates 10 identical Opportunities whenever an Account with 
more than 99 employees is created. Make sure all Opportunities are associated with the 
Account. Use any values for the fields on the Opportunities. 
 
Then, write a test class that achieves 100% code coverage! 
 

Week 6: Putting It All Together 


 
You’ve learned the basics of Apex! Now we’ll solidify your knowledge through hands-on 
homework. Refer back to previous chapters if you are stuck. 
 
Homework: W ​ rite a trigger on the Lead object that populates a custom “Key Fields Populated” 
(API Name: K​ ey_Fields_Populated__c​) number field whenever the Lead is created.  
 
“Key Fields Populated” should count the total number of the following fields that are not null: 
● FirstName 
● LastName 
● Email 
● Phone 
● Website 
● Title 
 
For example, if FirstName, LastName, and Email are populated, “Key Fields Populated” should 
equal to 3. 
 
If at least 3 key fields are populated, create a new Task for ​each​ key field populated: 
● The name of each Task should be: ​Verify the <<key field name>> field 
 
Make sure to write a test class with 100% coverage too! 
 
Extra Credit #1: i​ f any of the key fields contain the word “test” (in any combination of upper or 
lowercase letters), always: 
● Create a new Task with: 
○ Subject: “WARNING” 
○ Description: “This Lead contains the TEST keyword in the following key fields: 
<<comma separated list of only the key fields containing the TEST keyword>>” 
 
Ensure the test class has 100% coverage! 
 
Extra Credit #2:​ If a custom B ​ ypass_Triggers__c​ field is checked, skip all the logic in the 
homework and extra credit #1! 
 
Ensure the test class has 100% coverage! 
 

Week 7: Introduction to SOQL 


 
Unlock the true power of Apex by learning the SOQL language! 
 
1. Apex Academy #3​: Course Overview 
a. Estimated Time: 5 mins 
2. Apex Academy #3​: Course Introduction 
a. Estimated Time: 10 mins 
3. Apex Academy #3​: SOQL Boot Camp 
a. Estimated Time: 60 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 2.1​: What is SOQL and why should I learn it? 
b. Chapter 2.2​: Where to write SOQL queries 
c. Chapter 2.3​: Example: How to write a simple SOQL query 
d. Chapter 2.4​: Example: How to write a cross-object SOQL query (“upwards”) 
e. Chapter 2.5​: Example: How to write a cross-object SOQL query (“downwards”) 
 
Homework:​ Do the practice exercises in the SOQL Boot Camp lesson.  
 

Week 8: Using SOQL in Apex 


 
SOQL and Apex is a match made in heaven. Learn how to combine the two languages in a single 
trigger. 
 
1. Apex Academy #3​: Understanding SOQL in Apex 
a. Estimated Time: 60 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 4.1​: Intermediate triggers: Combining Apex with SOQL 
b. Chapter 4.2​: Using Apex variables inside a SOQL query 
c. Chapter 4.3​: Example: How to write a deduping trigger for leads and contacts 
 
Homework:​ Write a trigger that populates an Account’s “Contacts Created This Year” field. This 
trigger should populate this field with the total number of related Contacts that were created 
this year that have a phone number populated. 
 
Extra Credit: D
​ o both of the challenge assignments in the “Understanding SOQL in Apex” lesson. 
 

Week 9: Using SOQL in Test Classes 


 
Love em or hate em, but test classes become A LOT more useful once you combine them with 
SOQL and test assertions. Now the true testing begins! 
 
1. Apex Academy #3​: Writing Defensive Test Classes 
a. Estimated Time: 60 mins 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 4.5​: Principles of a Good Test Class 
b. Chapter 4.6​: Example: Write a test class for our deduping trigger! 
 
Homework:​ Write a test class for the homework in Week #8. Make sure to test multiple 
scenarios and to use System.assertEquals in each of them. 
 
Extra Credit: D
​ o the course homework for Apex Academy #3. 
 

Week 10: Reinforcing Key Concepts 


 
You are now ready to begin Trailhead developer content, which assumes you have existing 
developer skills (this is true for you now!) 
 
1. Trailhead: ​Apex Basics & Database 
a. Estimated Time: 180 mins 
 
Make sure to do finish all the Trailhead challenges! 
 

Week 11: Scaling Your Code, Part 1 


 
For your code to be enterprise-ready, it must scale. This means you need to learn how to “bulkify” 
your code to make it run efficiently. 
 
1. Trailhead: ​Apex Triggers 
a. Estimated Time: 60 mins 
2. Trailhead: ​Apex Testing 
a. Estimated Time: 60 mins 
 
Make sure to do finish all the Trailhead challenges! 
 
Suggested Reading: 
1. Apex Tutorials​:  
a. Chapter 5​: Bulkify Your Code 
b. Chapter 4.3​: Principles of a Good Test Class 
 
Extra Credit: B
​ ulkify the Week 8 homework trigger. 
 
Week 12: Scaling Your Code, Part 2 
 
Who said scaling was easy?? 
 
1. Trailhead: ​Build Efficient Applications Without Limits 
a. Estimated Time: 150 mins 
 
Make sure to do finish all the Trailhead challenges! 
 
Optional Reading: 
2. Apex Tutorials​:  
a. Chapter 6​: Advanced Apex Concepts 
 
Extra Credit: B
​ ulkify the Week 9 homework test class. 
 

Week 13: Objects 


 
Let’s do some projects with objects! 
 
1. Trailhead Project: ​Quick Start: Apex 
a. Estimated Time: 20 mins 
2. Trailhead Project: ​Quick Start: Apex Coding for Admins 
a. Estimated Time: 50 mins 
3. Apex Tutorials​: 
a. Chapter 8.6​: “The “One Trigger per Object” design pattern 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 7​: Write Your First Advanced Trigger! 
b. Chapter 8​: Object Oriented Thinking 
 
Homework: U ​ se the “One Trigger Per Object” design pattern to combine Week 4 and 5’s 
homework triggers.  
 

Week 14: Introduction to Visualforce 


 
Time to do some front-end UI code. 
 
1. Trailhead: ​Visualforce Basics 
a. Estimated Time: 150 mins 
 
Make sure to do finish all the Trailhead challenges! 
 
Optional: 
1. Introduction to Visualforce Course​: 
 

Week 15: Introduction to Lightning Web Components 


 
The UI code of the future. 
 
1. Trailhead: ​Quick Start: Lightning Web Components 
a. Estimated Time: 20 mins 
2. Trailhead: ​Lightning Web Components Basics 
a. Estimated Time: 60 mins 
 
Optional: 
1. Trailhead: ​Build a Bear-Tracking App with Lightning Web Components 
 
Make sure to do finish all the Trailhead challenges! 
 

Final Project: 
 
Information about the final project can be found at: ​bit.ly/go-apex-project 
 

Closing Thoughts 
 
Congratulations on completing this rigorous course! 
 
You are now ready to start applying for Salesforce developer and admin/developer hybrid jobs! 
 
------------------------------------- 
 

Update Log: 
02/28/2019 - Updated Lightning week to new “Lightning Web Components” Trailheads 
02/28/2019 - Updated Week 8 homework 
02/05/2019 - Added tutorial to Week 13 
01/16/2019 - Added final project and table of contents 
01/15/2019 - Added extra homework and reading to Weeks 10+ 
12/4/2018 - Added extra homework and revised challenges 

Potrebbero piacerti anche