• stayal1.2953349221005618E12
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

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

 

Hello everyone.

I have a querstion about the creation of fields in salesforce.

It's possible I create a custom field in object Task? If it's possible as I do?

Thx for replies.

Can the new Dynamic Visualforce Components be used to generate an outputText tag with merge fields, such that the merge fields are resolved when the page is displayed?  Something like this.

 

<apex:page standardController="Account" extensions="dynamicSample">
Name: <apex:dynamicComponent componentValue="{!dynamicName}"/> 
</apex:page>

 

public class dynamicSample {
public Component.Apex.OutputText getName () {
String x = new Component.Apex.OutputText;
x.value = "{!Account.Name}" ;
return x ;