How can i query for the type in opportunity stage?

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



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.

Source : Link , Question Author : Prady , Answer Author : kenslewis

Leave a Comment