0

I have a map map like that and I wanted to know if I could get all the occurrences of my key in one and the same list (without making a loop).

Would you be able to do that?

@future
public static void setRepartition(Set<ID> idOpps){

     Map<ID, Map<ID, OpportunityTeamMember>> wrapper = new Map<ID, Map<ID, OpportunityTeamMember>>();
     Map<ID, OpportunityTeamMember> opportunitiesTeamMember = new Map<ID, OpportunityTeamMember>();

     for (ID oppID : idOpps){
          opportunitiesTeamMember =new Map<ID, OpportunityTeamMember>();
          opportunitiesTeamMember = wrapper.get(oppID);

     //code

     }
}

Thanks !

1 Answer 1

0

As of now there is no method of map like map.getAll to get all values of map by passing keySet.

2
  • So I have to go through a loop to add as I go along ?
    – cpt_3n0x
    Nov 2, 2018 at 9:40
  • Yes. the way you are already doing. Nov 2, 2018 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .