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
ShamSham 

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.?
yogesh.rankawatyogesh.rankawat
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

:smileyhappy:
ShamSham
Thanks Yogesh.Its working.