Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
Thanks a lot :) –  RisingPhoenix Apr 28 at 6:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.