Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
6 answers
  1. Jul 18, 2019, 7:00 PM
    One return type that was not mentioned...

    If you assign the results of a SQOL to a single object and SOQL finds no results, the return type is NULL.

    If you aren't aware of this and you aren't doing a NULL check on the results, it can cause a "derefrencing a null value" exception.  It is best just to avoid the trouble and always return a list (with a size() or isEmpty() check).
Loading
0/9000