0

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

  • If you switch to debug mode, do you get any error messages in console or network tab ? –  May 10 '17 at 10:10
  • @SAPFioriCrew Unfortunately I don't get any error messages. When I add it as a ReferenceFacet being the child of a CollectionFacet, I get the following error message: Uncaught (in promise) Error: Error: adding element with duplicate id 'Customers3::sap.suite.ui.generic.template.ObjectPage.view.Details::CustomerSet--RFContact::::Field' – Benedikt Hölker May 16 '17 at 13:41
  • In the SAP developer guide, which you are referencing, there is also an “Annotations Target” in the contact annotation. Are you reading your data from an OData service? –  May 17 '17 at 15:18

0 Answers0