Skip to main content
1 个回答
  1. 2018年10月28日 06:35
    Hi Svi,

     

    I don't think so you can query directly the field label. Here is sample code that you can execute to get the field label.

     

     

    String type='Account';

    Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();

    Schema.SObjectType leadSchema = schemaMap.get(type);

    Map<String, Schema.SObjectField> fieldMap = leadSchema.getDescribe().fields.getMap();

    if(fieldMap.containsKey('DHC')){

    System.debug('##.Field Label Name='+fieldMap.get('DHC').getDescribe().getLabel());//It provides to get the object fields label.

    }

     

     
0/9000