I'm running into a strange error when trying to display a custom field from a custom object dynamically on a visualforce page.
I'm getting this error
Unknown property '$ObjectType.CFIM__Request__c.fields.CFIM__Notes__c'Error is in expression '{!$ObjectType.Request__c.fields[f.apiName].label}' in component <apex:repeat> in component cfim:emailtemplatenewError evaluating dynamic reference 'CFIM__Notes__c'
I've confirmed that f.apiName ('CFIM__Notes__c') is giving the correct value, and I tried to output it manually
{!$ObjectType.Request__c.fields['CFIM__Notes__c'].label}
and this works perfectly fine.
There are other fields that are included in this repeat (this field is just the example of other fields)