12

How do i query for all opportunities which has the type "Closed/won" on opportunityStage not the stage "Closed/Won". We have a few stages which are of Type Closed/Won but not with the stagename as closed/won

image

1 Answer 1

14

Use the IsWon field in your SOQL condition expression. For example,

SELECT Id, Name FROM Opportunity WHERE IsWon = TRUE

will return all Opportunities with any StageName of Type Closed/Won.

1
  • 4
    If someone is looking for the opposite, it's the IsClosed field. Commented Jul 27, 2018 at 4:10

You must log in to answer this question.

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