You need to sign in to do that
Don't have an account?
Get description of field label of an object : issue with boolean field
Hi
This is my code :
Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.Contact.fields.getMap();
List<String> fieldNames=getFieldList(fieldMap);
String tmp='';
for(String fName:fieldNames)
{
tmp=tmp+fName;
}
...
with
public List<String> getFieldList(Map<String, Schema.SObjectField> fieldMap) {
//Make a comma-separated list of the fields
List<String> fieldList =new List<String>();
for(String fieldName:fieldMap.keySet()) {
Schema.DescribeFieldResult fieldDescribe = fieldMap.get(fieldName).getDescribe();
fieldList.add(fieldDescribe.getName());
}
return fieldList;
}
It returns me all fields of contact object except boolean like "HasOptedOutOfFax" and other custom boolean fields
What am I doing wrong ?
Thanks for your help
Regards
All Answers
Thanks a lot
Since I was acting as a Guest, this was the solution !
Regards