Join Duard Lynn Davis for an in-depth discussion in this video Maps, part of Learning Salesforce.com Development.
- [Narrator] K now we're going to look at maps.…And I want to start with a couple of…methods that are available with maps.…One contains key.…Remember map is nothing more than…a key value pair.…So before I try to use the value…I need to make sure the key is there.…So I can take my map,…in this case myContactToAccountMap,…and I can ask if it actually contains…the key of my contact id.…This is important to do…because if it's not there,…you're going to get a null reference error.…So once I determine it's there…I can then use that to get the value.…
So you can see here…where I'm going to set a field on my contact…and I'm going to get that value from my map…by saying myContactToAccountMap.get…the contact Id.…That's going to return the account…and then I'm going to reference…that field on…the Account_Text_Info_One_c.…The way we initialize maps,…couple different ways.…One we can set it to a query.…In this case we're going to say map id and account,…and then we're going to set it to a query…that we're doing on an account.…
So this will just create a very simple…
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.