here the sObjectType is of Account
type
Map<String, Schema.SObjectField> fieldMap = sObjectType.getDescribe().fields.getMap();
for (String fName: fieldMap.keySet())
System.debug('Field Name '+ fName + ' Label ' +fieldMap.get(fName).getDescribe().getLabel() );
in Salesforce
account object field name for phone is Phone
and lable is also Phone
but when I try to access it using above method it shows field name as Phone
and label as Account Phone
screenshot of my logs
Not sure why it is happening this way
screenshot of account from Salesforce
While accessing it using Tooling API
it shows the correct label
SELECT EntityDefinition.QualifiedApiName,FieldDefinition.DataType,FieldDefinition.Label,FieldDefinition.QualifiedApiName FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName IN ('Account')
screenshot of result fetched using Tooling API