Sie sind auf Seite 1von 11

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 and Lightning components. 
 
This course prepares you for the bulk of the ​Platform Developer I certification​. Additional study 
is recommended (​Certification Study Guide​, Visualforce) to improve your odds! 
 
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: Scaling Your Code, Part 3

Week 14: Objects


Week 15: Introduction to Lightning Web Components

Final Project:

Closing Thoughts

Frequently Asked Questions (FAQs):

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. I am working on updating this! 
 
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 
 
Alternate 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. 
 
Make sure to check out the ”​ How do I know if my homework is correct?”​ question in the FAQs! 

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 
 
Alternate 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 
 
Alternate 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 
 
Alternate 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 
be 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 on the Lead, 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 
 
Alternate 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 
 
Alternate 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 “Callable Contacts” field. This trigger 
should populate this field with the total number of related Contacts that have a phone number 
populated. Assume Contacts are never deleted. 
 
Extra Credit: I​ lied. Contacts are deleted all the time. Modify your trigger so the “Callable 
Contacts” field also updates when Contacts are deleted. 
 

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 
 
Alternate 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 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. Apex Tutorials​:  
a. Chapter 5​: Bulkify Your Code 
 
Optional Reading: 
1. Apex Tutorials​:  
a. Chapter 6​: Advanced Apex Concepts 
 
Homework: W ​ rite a trigger that automatically sets Tasks to the “Completed” status whenever 
their associated Leads are set to any Closed status. Make sure your trigger is bulkified - there 
should be no SOQL queries inside any loops! 
 
Extra Credit: S
​ end an email to all Lead owners notifying them that their Tasks have been 
automatically completed. This should be bulkified too! 
 

Week 12: Scaling Your Code, Part 2 


 
Who said scaling was easy?? 
 
1. Apex Tutorials​:  
a. Chapter 7​: Write Your First Advanced Trigger! 
 
Optional: 
1. Trailhead: ​Build Efficient Applications Without Limits 
 
Homework: B ​ ulkify the Week 8 homework trigger. 
 

Week 13: Scaling Your Code, Part 3 


 
Bulkify those test classes! 
 
1. Trailhead: ​Apex Testing 
a. Estimated Time: 60 mins 
2. Apex Tutorials​:  
a. Chapter 4.4​: Principles of a Good Test Class 
 
Make sure to finish all the Trailhead challenges! 
 
Homework: B ​ ulkify the Week 9 homework test class. 
 

Week 14: 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 8​: Object Oriented Thinking 
 
Homework: U ​ se the “One Trigger Per Object” design pattern to combine Week 4 and 5’s 
homework triggers.  
 

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 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! 
 
 
------------------------------------- 
 
 

Frequently Asked Questions (FAQs): 


 
Will this program prepare me for the ​Platform Developer I certification​? 
 
Yes it certainly will! I personally know beginners who have completed this curriculum and 
passed the Platform Developer I certification weeks afterwards.  
 
Note that PDI covers topics NOT in this curriculum, for example, Visualforce & Lightning 
components. Each of those languages require Apex knowledge, so this curriculum is an 
excellent starting point to learn them. I recommend using ​Trailhead​ to continue your learning 
after you complete the ​final project​! 
 
How do I know if my homework is correct? 
 
For any coding requirement, there’s always many many correct ways to solve it. I’m continuously 
amazed at how new coders especially find creative ways to solve problems.  
 
The short answer is if your code works when you test it out in your org (directly in the UI, not 
necessarily in a test class) - then your homework is correct! Make sure to test as many different 
scenarios as possible as there may be edge cases. 
 
Don’t worry too much about having perfect code that’s ultra efficient and uses the least amount 
of lines. Right now it’s most important to learn. You will naturally improve over time. 
 

Update Log: 
11/05/2019 - Added intro blurb about preparing for the Platform Developer I certification 
10/16/2019 - Updated Week 13 Apex Tutorial from 4.3 to 4.4 (typo) 
10/03/2019 - Fixed broken links 
09/22/2019 - Added Frequently Asked Questions section 
09/18/2019 - Updated Week 8 homework and extra credit 
06/19/2019 - Added new homework and extra credit for “Scaling Your Code, Part 1” 
06/19/2019 - Stretched the “Scaling Your Code” series an additional week longer 
06/19/2019 - Removed the week dedicated to Visualforce. It’s time to move on! 
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/04/2018 - Added extra homework and revised challenges 

Das könnte Ihnen auch gefallen