You need to sign in to do that
Don't have an account?

Picklist values based on recordtype
Below is the scenario where i'm stuk.
I want to get picklist values based on recordtype for a object (account) but i'm not able to get it .
below is some code through which i have tried to get that.
RecordType rttt = [SELECT Id,Name FROM RecordType WHERE SobjectType='Account' and name='newrecformanaged'];
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult fieldResult = account.rttt.Type.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.picklistValues;
for(Schema.PicklistEntry p : ple)
{
if(p.active)
options.add(new SelectOption(p.Value, p.Value));
}
system.debug('@@@@@@@@@'+options);
here is salesforce link that have some suggession:http://hisrinu.wordpress.com/2011/04/20/advantage-of-describe-calls/
any help will be appreciable