The household relationships in Financial Services Cloud

I was recently looking into the Household feature in Financial Service Cloud (FSC). A tree-like structure, nicely presented in a Lightning component, shows all the household members and their related entities. I couldn’t find any documentation on what entities were exactly selected in each tile of the component so decided experimenting a bit by querying …

An anti-pattern causing the “CPU time limit exceeded” error in batch Apex

I recently came across a “CPU time limit exceeded” error thrown from an Apex class that implements the Batchable interface. It is not a typical one caused by excessive Apex logic according to the following observations: There is no stack trace or error details. The error is consistently hit on the first batch of the …

Object alias in SOQL

The object alias used in SOQL can reduce the number of characters in query string and improve the readability. Suppose there are these objects with parent-child relationship: Parent: ObjectA Child: ObjectB Grand Child: ObjectC And all of these objects have three fields: Field1, Field2 and Field3. A normal SOQL statement that join these objects from …

Gotcha: convertTimezone() must be used in SOQL Date functions dealing with Datetime

SOQL Date functions are pretty useful for grouping or filtering data by date fields. With a proper Date function used in the SOQL, the code can potentially limit the query result records a lot. e.g. Query all Tasks that are created today: The above code looks neat enough although the function DAY_ONLY is not that …