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
Sokhna VorSokhna Vor 

Is it possible to Select RecordType__c From Opportunity?

Best Answer chosen by Sokhna Vor
Georgy PeshkovGeorgy Peshkov
What results do you want to get by your query? If you want to get RecordType names, you can make a query like
SELECT ID, recordtype.name FROM opportunity 

and get the name of the recordtypes linked to to its IDs.

All Answers

Georgy PeshkovGeorgy Peshkov
Hello.

It is possible to select recordtypeID from opportunity, but that's a standard field (no "__c" in API name)
Do you have some custom field, called recordtype__c on your opportunity object?
Sokhna VorSokhna Vor
RecordTypeID works, wondering how to use RecordTypeID with what other objects? There is a RecordType on Opportunity object? But when i tried, it did not work either. 
Georgy PeshkovGeorgy Peshkov
It is possible to select RecordTypeID from any object, which has more than one record type. If your opportunity has only default record type, it wouildn't allow to query for RecordTypeID.
Sokhna VorSokhna Vor
My opportunity allows actually to query RecordTypeID. I thought I can query RecordType directly from Opportunity. I believe I can just join RecordTypeID from Opportunity and with Id from Record Type Object. Is that the way to go? 
Georgy PeshkovGeorgy Peshkov
What results do you want to get by your query? If you want to get RecordType names, you can make a query like
SELECT ID, recordtype.name FROM opportunity 

and get the name of the recordtypes linked to to its IDs.
This was selected as the best answer
Sokhna VorSokhna Vor
Perfect! Thank you, Georgy! 
JeffreyStevensJeffreyStevens
Don't forget to mark the question as answered with the best answer also.
Sokhna VorSokhna Vor
Just marked! Another a slight different question... I can get ACV_Summation__c from Opportunity. How can I get TCV? Why would the Amount from Opportunity differ from ACV_Summation__c? Thanks 
JeffreyStevensJeffreyStevens
Might want to create a new thread for the ACV TCV question.

But, those are custom fields, so there would be quite a few questions to track down what you're asking there.  Like - are they roll-up summary fields?  Are they fields that are maintained by a trigger?  Stuff like that.

Good luck