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

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;
}
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;
}
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.