5

We have several record types in our Case implementation.

I am able to get the record typeid only with the following.

SELECT Id,RecordTypeId FROM Case

If I try this, it is giving me an error.

SELECT Id,RecordTypeId,RecordTypeName FROM Case

I believe, I am new to SF so I am not sure, that we should be able to query the record type name of the case also in a SOQL.

Can someone tell me how to do that ?

1 Answer 1

14

It's RecordType.Name

RecordTypes are held in separate reference table so to query the names just treat the RecordTypeId as any other lookup field :)

In case you've never used the "dot notation" (the way SOQL handles relationships and things that would be JOINs in regular databases): http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .