function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tlaurietlaurie 

get contacts from opportunities

I am trying to query contacts for a particular opportunity and I keep getting malformed query.  Any help with the wuery or am I totally on the wrong track?

 

binding.query("Select firstname, lastname From Contact where Id IN (Select contactid from OpportunityContactRole where OpportunityId= '" & opportunity.Id & ")'")

tlaurietlaurie

misplaced ")"

 

binding.query("Select firstname, lastname From Contact where Id IN (Select contactid from OpportunityContactRole where OpportunityId= '" & opportunity.Id & "')")

SuperfellSuperfell
Are you using the v15 API version? (which is needed to perform semi-join queries).