Is it possible to create a Map with duplicate Key
Key Value
Product 1 100
product 1 200
product 2 200
product 2 300
Scenario : I have a trigger on quote and have to find the listprice of quotelineitems which have the same product name
I constructed a map with (productname,quotelineitem.listprice)
I have custom setting to check if the map has the key "product name" and then add up all the values
The problem is that I cannot form the above map because I am forgetting the fact that maps cannot have duplicate KEYS 🙁
IS there a better way to approach this
Best Answer
Map of lists maybe?