+ Start a Discussion
venkateshyadav1243venkateshyadav1243 

Test Class for Schema.DescribeFieldResult

Hi
Am not able to get the field result from Schema.DescribeFieldResult

can any one help me how to get the field result below is my method

public String LabelDataType{get;set;}
    public String FieldObject{get;set;}
public String Label {get;set;}


public PageReference fieldtype(){
    String APIName = getAPIName(FieldObject, Label);
    if(APIName == ' None')return null;

Schema.DescribeFieldResult fieldResult = getFieldResult(FieldObject,APIName);
  System.debug(LabelDataType.toUpperCase()+';;;;'+fieldResult.getType());
    if(fieldResult != null){
                    }
            else{
                        }
        }
    }

    return null;   
  }
bob_buzzardbob_buzzard
You haven't posted a couple of key pieces of code - the getAPIName function and the getFieldResult function - without those we're reduced to guessing what apex you've written and whether there are errors in it.