+ Start a Discussion
SArunSArun 

Selecting OpportunityStage.SortOrder in SOQL query

 

SELECT NAME, STAGENAME

FROM Opportunity

 

I need to pick OpportunityStage.SortOrder in the above query and order the list based on it. Can someone provide me the SOQL to select  "OpportunityStage.SortOrder" in the above query

 

werewolfwerewolf

You can't get that information right in that query.  You can do another query for stages though, like

 

Select o.SortOrder, o.MasterLabel, o.IsWon, o.IsClosed, o.IsActive From OpportunityStage o