Loading tutorials
List in Apex: adding, reading, replacing, removing, searching, slicing, and sorting. It assumes you can write basic Apex (variables, loops, conditionals) and that you know what a List is from the previous chapter. It does not use SOQL, so y4 min readList, and what a SOQL bind variable is. It covers what a Set guarantees, how to create one, and the errors that most often catch developers off guard. The next chapter covers the full method list and set algebra, so only add, `cont5 min readinsert and update. It covers what changes when the elements are records instead of strings or numbers.4 min readfor loops and with the difference between a missing key and a null value in a Map. The next chapter applies nested collections to group records. Here we cover the mechanics: 4 min readMap<Id, SObject> built from a SOQL result and keySet(). It also assumes you can write a basic SOQL WHERE ... IN :bindVariable query.5 min readList, call its basic methods, and loop over it. It also assumes you can read a simple SOQL query. Sorting is a List-only operation in Apex, so the chapter covers three things: what List.sort() does on its own, how to teach it a custom order with Comparable5 min read