Currently I am developing an app with Fiori Elements for Customers and SalesOrders.
On the object page I want to display contact and address information of a customer. Thus I created a new project from Template, I selected the "List Report" and I added an annotation file. In the annotation file I created the following annotations:
<Annotation Term="vCard.Contact">
<Record>
<PropertyValue Property="fn" Path="Name"/>
<PropertyValue Property="title" Path="Title"/>
<PropertyValue Property="n">
<Record>
<PropertyValue Property="given" Path="Firstname"/>
<PropertyValue Property="additional" Path="Middlename"/>
<PropertyValue Property="surname" Path="Lastname"/>
</Record>
</PropertyValue>
<PropertyValue Property="tel">
<Collection>
<Record>
<PropertyValue Property="type" EnumMember="Communication.PhoneType/fax"/>
<PropertyValue Property="uri" Path="FaxNumber"/>
</Record>
<Record>
<PropertyValue Property="type" EnumMember="Communication.PhoneType/work"/>
<PropertyValue Property="uri" Path="Tel1Numbr"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="email">
<Collection>
<Record>
<PropertyValue Property="type" EnumMember="Communication.ContactInformationType/work"/>
<PropertyValue Property="address" Path="EMail"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
"vCard" is defined as a reference in the reference section of the annotation file:
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470971/Communication.xml?api=v2">
<edmx:Include Alias="vCard" Namespace="com.sap.vocabularies.Communication.v1"/>
</edmx:Reference>
I tried to display the contact information in a facet, but unfortunately, nothing gets rendered:
<Record Type="UI.ReferenceFacet">
<PropertyValue Property="Label" String="Supplier"/>
<PropertyValue AnnotationPath="@vCard.Contact" Property="Target"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
I am referencing the SAP developer guide: https://sapui5.hana.ondemand.com/#docs/guide/a6a8c0c4849b483eb10e87f6fdf9383c.html
Neither the console nor the network tab show related error messages. When I add the ReferenceFacet to a Collection Facet, the following error message is displayed in the console: Error message for CollectionFacet