Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to retrieve the record types available for an object. Is the recommended way to do this to use the recordTypeInfos collection returned on the object's metadata?

share|improve this question

Yes it is.

RecordTypeInfo Methods The following are methods for RecordTypeInfo. All are instance methods.

  • getName() Returns the name of this record type.

  • getRecordTypeId() Returns the ID of this record type.

  • isAvailable() Returns true if this record type is available to the current user, false otherwise. Use this method to display a list of available record types to the user when he or she is creating a new record.

  • isDefaultRecordTypeMapping() Returns true if this is the default record type mapping, false otherwise.

Note that as it says, "is available" means the user can create new records with this type. It doesn't affect whether the users can see existing records of the type.

share|improve this answer

Your Answer


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.