Preface: this post is part of the Write Your First Trigger From Start to Finish series.
Chapter 1 Questions:
1. If you can solve a business need using either a workflow or a trigger, which should you use?
2. Is it possible to write a trigger directly in a production Salesforce org?
3. What is Trigger.new and why is it so important?
4. Which version of the field name do you reference in triggers? Field Label or Field/API Name?
-Field Name: Favorite Color
-Field / API Name: Favorite_Color__c
5. Is it possible to deploy code to production without writing a test class?
6. How does your test class know which trigger to test?
7. True or false. Developers should avoid using comments as much as possible in code since comments are ignored by Salesforce.
8. At minimum, how many components must be added to a Change Set to deploy an Apex trigger?
Chapter 1 Practice Trigger:
Write a trigger that transfers every new contact to an Account named “Sfdc99”!
Don’t forget the test class!