You need to sign in to do that
Don't have an account?
amateur1
values getting overwrite in map
hi here i am creating a map and i have 6 values in the query but only the last value is getting into the map. how to get all the 6 values
for(ROI_Visualization_Calulator_Line_Item__c rvc:[select id,name,ROI_Visualization__c from ROI_Visualization_Calulator_Line_Item__c where ROI_Visualization__c in:trigger.newmap.keyset()])
{
mapRoi.put(rvc.ROI_Visualization__c ,rvc);
}
Hi,
In the map the key should be unique. If a key has two values in map the previous value will overwrite with new value. So please check the six values you are getting have same rvc.ROI_Visualization__c or different values.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
In the map the key should be unique. If a key has two values in map the previous value will overwrite with new value. So please check the six values you are getting have same rvc.ROI_Visualization__c or different values.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
yes the six values have same rvc.ROI_Visualization__c but i am getting only the last value how to get all the six values into map