Martins Thoughts on Salesforce

How to write SOQL queries with dates

Anw how to remember the format in the future

How to write SOQL queries with dates Date formats and SOQL may be super straightforward. But if you work with multiple languages, it may be hard to remember how you use dates and times in SOQL queries. TL;DR; Format: YYYY-MM-DDTHH:MM:SSZ Example: 2023-05-04T12:02:23Z There is a quick way to get to the format if you forget it. You can, in your developer instance, open the developer console and write the following piece of “anonymous apex” (check the “Open Logs” box before hitting “Execute”).

Create Collections in APEX and initiate them

A cheat-sheet for the Salesforce developer

Create Collections in APEX and initiate them As a developer of multiple languages, I must remember how to create the different collection types when writing code in APEX. Sure, it is simple enough to make an empty collection, but you often want to create and initialize it simultaneously. This is when my memory struggles to remember. You may be the same - and here is a small cheat sheet that will help you in these situations.