Page 1 of 1

RecordType of Salesforce Account

Posted: Tue 12 Apr 2016 03:57
by PascalD2
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

Re: RecordType of Salesforce Account

Posted: Wed 13 Apr 2016 07:16
by Shalex
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'