You need to sign in to do that
Don't have an account?
![Naresh Chanda Naresh Chanda](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
how to query the opportunity stage type (Open,Closed/Won, Closed/Lost) ?
How to query the opportunity stage type (Open,Closed/Won, Closed/Lost) when an opportunity Id is given.
Also, is it possible to add more entries to Type picklist and can this field be used in integrations with other applications?
Also, is it possible to add more entries to Type picklist and can this field be used in integrations with other applications?
Try to use below query and it should work.
SELECT id,StageName,Type FROM Opportunity where id='123'
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
Thank you for your response. I am looking for Opporuntity Stage Type - Open, Closed/Won, Closed/Lost that you see when you open the Stage field on an Opportunity object. Not the Opporunity Type field which we can retrieve directly.
This is not feasible to when you query and also I haven't seen any related links which says this can be used in integrations.
Try to use lov's of picklist.
Thanks,
Vinay Kumar
OpportunityStage Background Info
Querying the Opportunity Stage information using a SOQL query is possible. The OpportunityStage Object contains that information. There are many "System Objects" available that don't show up in the Object Manager in Setup. However, one can see a list of all the queryable Objects by using a tool such as Workbench.
For example, this SOQL query will query the Stage's whose Type is Closed Lost
SELECT Id, MasterLabel, ApiName, IsClosed
FROM OpportunityStage
WHERE IsClosed = true
AND IsWon = false