Developer 1 - Objects

25 - Introduction to Objects

  • Object-Oriented Programming: programming methodology that is widely accepted as one of the most efficient ways to code.
    • Term “Object” is unfortunately kind of ambiguous in Salesforce:
      • Salesforce Objects:
        • Accounts, Contacts, Custom Objects, etc
        • Built declaratively with clicks
        • Used to organize the data we store in Salesforce
      • Apex-Developed Objects:
        • Built in Apex and used only in a programmatic context
        • Used to organize reusable methods and variables
        • Apex objects aren’t used to store data like Salesforce Objects are - just used to better organize code
  • Example problem:
    • A company wants all their Account Names to be pre-pended with “ABC -”. Example: “AVC - Complex Storage”
    • When a user tries to save an Account that doesn’t follow this format, an error should be thrown
    • In the real world, this would be done with a validation rule. For purposes of this course, we will do it with Apex and implement the solution using object-oriented principles.

26 - Constructors and Instantiation

27 - Variables

28 - Sub-classes

29 - DML Statements

30 - SOQL Queries

31 - SOSL Queries

32 - Dynamic Queries

33 - Data Governor Limits

35 - Challenge 2 - Work Check