Want to learn how to code in Salesforce but scared to start? This course is for you! We'll give you a crash course on Salesforce development and teach you how to write, test, and deploy Apex triggers. No programming experience required - anyone can code! Taught by a Salesforce Technical Architect who works at Google.
David Liu is a self-taught programmer whose dreams came true when he became a Salesforce Technical Architect at Google. Now, David dreams of inspiring the next generation of Salesforce developers. He's a four-time Salesforce MVP winner and runs SFDC99.com, the world's most popular Salesforce blog.
Introducing Apex Welcome back to the Apex Academy! Hope you're fired up to learn code right now because now we're going to start getting into the juicy details. Before we start actually writing code, we need to make sure we understand the Salesforce automation landscape. Here's the scenario: You are a handyman or handywoman. Salesforce is your workbench, and like any good handyperson, you need to know three things. One, what tools do you have available in your workbench? Two, in what scenarios should you be using each of your specific tools? And three, how can you properly use each tool to its maximum potential? Let me introduce you to Apex and get you started on your Salesforce master architect journey. Here's an overview of the topics we'll cover during this module. First, I'll teach you about all of the tools available to you in Salesforce for automating business logic. You have many declarative and programmatic tools, and it's important for you to know when to use each. We're going definitively answer the age-old Salesforce question when should you code, and when should you not? Next, I'm going to give you an overview of Apex triggers, what they are, how they work, and why we choose to learn them first. We'll also talk about the required components needed to deploy a working trigger to your organization. Finally, I'll show you the four most common places Salesforce developers choose to write code and what their specific pros and cons are. We'll get you set up with your coding environment so you can start writing code immediately in the next module.
Writing Basic Apex Triggers Ladies and gentlemen, welcome back to the Apex Academy. I'm David Liu, your loyal host and teacher, and I am very excited right now because this module is going to be a good one. We're going to be writing our very first triggers and demystify what you may have considered magic up until this point. Today, you are the magician. I'm going to give you a fair warning right now. There is going to be a lot of code in this module. My intention is not to glaze over concepts, but to give you a thorough understanding of how code works by showing you different triggers from different angles. Plus, I want to make sure you get your money's worth. The more triggers you read and write, the more you're going to start recognizing the patterns in code. We'll be talking about that more in this module. For now, grab a cup of your favorite caffeinated drink, and let's get started coding. Here's an overview of what we'll be talking about during this module. First, we're going to write the simplest of triggers, and I'm going to explain to you how it works. Next, I'll teach you about a fundamental pattern used in every trigger known as the trigger loop. We'll write another, slightly more involved trigger, then I'll help answer what is perhaps the most Googled trigger question of all time, when do we use before versus after triggers? Finally, we'll reinforce and demonstrate everything we learned by writing one more trigger.