RecordType of Salesforce Account

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Post Reply
PascalD2
Posts: 9
Joined: Wed 12 Jan 2011 03:48

RecordType of Salesforce Account

Post by PascalD2 » Tue 12 Apr 2016 03:57

Hi,

I need to query the account table for a specific account type

with SOQL in the developer console I can execute the following query

Code: Select all

SELECT Id, 
       Name
FROM Account 
where RecordType.DeveloperName = 'Clinique'
but the same query fails with a SalesforceCommand...
with error: Unknown Column 'RecordType.DeveloperName'

Is it possible to do with a command?

Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: RecordType of Salesforce Account

Post by Shalex » Wed 13 Apr 2016 07:16

Please try this way:

Code: Select all

SELECT a.Id, a.Name FROM Account a
INNER JOIN RecordType rt ON a.RecordTypeId = rt.Id
WHERE rt.DeveloperName = 'Clinique'

Post Reply