I am using recordViewForm (in API version 43) because I have to use lightning:outputField tags inside for its automated formatting and features like mailTo, tel:, map on address, etc. (and I am pulling in the fields to be displayed dynamically from Custom Metadata type so I can not hardcode the field names and its types). I am NOT implementing force:hasrecordId interface as this component is added only in Custom Lightning component.
When I pass the record Id to recordViewForm, I see following error. For testing, I displayed record id just before recordViewForm tag so I am sure recordId is NOT null.
Now if I use lightning Data Service to get recordId and pass it to recordViewForm, I do not see above error however, none of the fields are displayed. I am stuck here due to dynamic nature of the field list that I want to display. Otherwise I could have simply hardcoded the field names according to their types.
Anybody else facing this issue? OR any help is appreciated?