Not able to see the label of the Api names
Solution 1:
Can you use $SobjectType
to get the field label, something like {!$ObjectType.Account.fields[itr].label}
?
Alternatively in apex build a Map<String, String>
where key is the api name and value is the label. Or you can even iterate over list of field tokens, not strings. sObject
class supports a dynamic get
with field token as param so same trick should work in VF and you can get label out of a token too.
Solution 2:
Yeah! {!$ObjectType.Account.fields[itr].label}
It is the way to get the Label from the API name of Objects and For the dynamic objects. We can use this {!$ObjectType[sObject].fields[itr].label}
as it will take out the label from the API names.