+ Start a Discussion
ppiyushppiyush 

referencing Accountid for Opportunity item

Hi there,

 

I need to reference the AccountId of an opportunity in apex. How do I best do this?

 

Lets say opp is an Opportunity. Is opp.get(Accountid) not valid?

 

It's returning null for me everytime I try.

 

Best regards,

Pranav

Best Answer chosen by Admin (Salesforce Developers) 
Ispita_NavatarIspita_Navatar

Have you tried opp.Accountid?

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.