Join Duard Lynn Davis for an in-depth discussion in this video Sets, part of Learning Salesforce.com Development.
- [Announcer] At this point we're going to start…looking a little more in depth at sets, maps, and lists.…And we're going to start with sets.…Remember sets are an unordered pair of Id values.…One of the unique things about sets is…the values in the set are unique.…That way if you actually add a value twice,…it only ends up in there once.…Can see here, you can add two sets by…just using the keyword ".add", and then putting…the value inside the parentheses that you want to add.…You can use sets to query for a list of objects,…and you can do that based on sets.…
So in our example here, you see we have list<Contact>,…myListContacts equals the select statement, and then at…the end we have where the ID is IN, colon, myContactIds.…So this assumes that we've created a set of myContactIds,…and any contact ID that is in that…set, we're going to query them.…Sets are commonly used as a string, a decimal, ID.…So basically, keeping them pretty simple.…You can do more complex sets, for example…we can do a set of an Account.…
AuthorDuard Lynn Davis
- How Apex works
- Bulkification and triggers
- Systematically debugging your code
- Sets, lists, and maps
- Trigger and trigger handlers
- Batch Apex
- Debugging and logging
Skill Level Intermediate
Salesforce for Sales Managerswith Christine Volden46m 47s Advanced
1. Introduction to Environment
2. Sets, Lists, and Maps
3. Trigger and Trigger Handlers
4. Batch Apex
5. Debugging and Logging
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.