+ Start a Discussion

'Map' usage concept



We usually use map in triggers and classes. Can someone help me to understand in which object we should use map?


Suppose: I have 2 objects:



Based upon crtain condition of objecct1, the certain field of object2 changes.

So,  in which object should we use map?


Please help.

Sonali BhardwajSonali Bhardwaj

Map is a kind of collection. You can only use map in Apex code only.

Yoganand GadekarYoganand Gadekar

Map is used to store your data.. it is one of the collections salesforce provides... it helps you hold data temperorily (in apex code) that helps build your logic.

Map has two components key and value..


it helps you store data with relationships...

It will be good to understand LIst and Set (List and set are other collections used in salesforce) and then visit this page to know more about maps..



All about collections (List,set and Map) here