+ Start a Discussion

Query RecordTypes Assigned to a particular Profile

In Apex,is it possible to query the various  RecordType(eg a standard Object) that is assigned to a profile.

I am trying to build a custom RecordType selection VisualForce page,where in i need to show only the RecordType
that are assigned to the currently logged in user profile.?
Use sObject Describe Result Method "getRecordTypeInfos", it return List<Schema.RecordTypeInfo> in which you should use isAvailable method to get the result.

For more info http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_sobject_describe_methods.htm

Thanks Yogesh.Its working.