function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rakesh KumarRakesh Kumar 

Can we get Profile's Records Type list by Salesforce Query?

Hi All,


Is it possible to get Profile's Record Type list by Salesforce Query? I have checked the profile table but there are no any records in such table.

If it is not possible then how can i get all activated recordType list.








The object that stores the data related to Record type is :- RecordType only.


To get the list of all active record type simply use.

SELECT IsActive FROM RecordType limit 10.


I hope this helps..




Rakesh KumarRakesh Kumar

Hi Tulika,


Thank you very much for reply.


As per as given answer its really good to get all activated recordType from RecordType Table. But i would like to retrieve all those record type which are set through Profile.

I hope you know how to set RecordType through profile. Just you can confirm about it to click Profile and then you can set recordType.


So that set recordType i would like to retrieve. So please if you have any idea share to me...





Hi Rakesh,


 I am unable to find a connection between Record Type and Profile.


The following fields are available in Record Type:-



None of them are able to give any information in regard to profile.


Below is the link of Data model that explains the Record types and it's relations.









Rakesh KumarRakesh Kumar

HI Tulika,


Thanks for reply.


Exactly you cant find a relationship between profile and recordType.Its not mentioned in to ER diagram. Last day i found that RecordType is handle by META Data xml file.YOu can see the your_profile.profile.xml Meta data that can contain the all setup recordType.


Those tags are in meta data is


       // i.e LayoutName.RecordType Name EXJ_nov can store in to RecordType table but how many RecordTypes are setup already that cant be store in any table.


When you set the visibility of recordType through profile then above <visible>tag will change true/false nothing else. It cant store any data in a table.


I hope you can get it how to handle the profile's RecordType.






You can do  "SELECT BusinessProcessId,CreatedById,Description,DeveloperName,Id,Name,SobjectType FROM RecordType where isactive = true and SobjectType = 'Profile' "


But why (and how most of all ?) are you even adding record types to the profile object ? What are you trying to do, is it possible that you wanted to ask something else ?

khillan bhardwajkhillan bhardwaj

hello ,

         i am displaying the Record type which are accessible by profile

i have used isAtive field of RecordTYpe which return all the RecordType which are active in Object

i have alse used SobjectType in query which return Record type which are of that Object

is there is any way to Retrieve the RecordType which are Accessible by Profile only

if it have some way to implement it then plz reply to me as soon as possobile


What if you wanted to create records in a custom object and assign ownership to a different user?  How would you specify the default record type for that user, for that object, without being able to look it up?  The default for a user, not necessarily being the same as the default for the object itself.  You would think salesforce would automatically assign the default record tpye for the owner of a record, but it doesn't.