• Steven Lim 4
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
for(Account a : [SELECT Id, Most_Recently_Created_Opportunity_Name__c 
                     FROM Account 
                     WHERE Id IN :accountIdOpportunityMap.keySet()]){
        a.Most_Recently_Created_Opportunity_Name__c = 
                               ((Opportunity) accountIdOpportunityMap.get(a.Id)).Name;
        accounts.add(a);
    }

Hello, there's a bit of APEX syntax I keep running into but I am having trouble comprehending. What does it mean to have [(Opportunity)] in parenthesis in front of the Map instance accountIdOpportunityMap.get(a.Id)? The line I am referencing is line 5.

What type of operation is this? Is there a name for this type of code in parenthesis I can read up on? Thanks!