Ability to query RecordType.Name in SOQL instead of using a nested query to get
We would like to have the ability to query RecordType.Name in SOQL very much we do with the other objects, instead of using a nested query to get the Id first. Nested queries count against the total number of queries in a transaction and sometimes it is important to keep track of all nested queries.
Currently we get an UNKNOWN ERROR when querying the RecordType.Name in SOQL in a query that grabs CampaignMembers. Although this is not clearly mentioned in any documentation, Salesforce mentioned that using the RecordType.Name in SOQL is not supported and we should use a nested query to get the Id instead.
So, instead of:
SELECT ... FROM CampaignMember WHERE RecordType.Name = 'ABC'
SELECT ... FROM CampaignMembers WHERE RecordTypeId in (SELECT Id FROM RecordType WHERE Name = 'ABC')
We would like this to be fixed and supported and be able to query any object based on the RecordType.Name.