0

How can you write a SOQL (Salesforce query language) query to find an opportunity, given its parent account's account id?

I want to do something like this (doesn't work though):

SELECT Id, Name FROM Opportunity WHERE AccountId = '003D000000f0gfH'
Jeff
  • 2,778
  • 6
  • 23
  • 27

1 Answers1

6

Your query is fine, but you don't have an AccountId, 003 prefixed ids are for contacts.

superfell
  • 18,780
  • 4
  • 59
  • 81