SAP Knowledge Base Article - Public

2275167 - Only one record returned when querying Odata API entity PerEmergencyContact

Symptom

  • When viewing Emergency contact Information of an employee in the UI you see there is more than one Emergency contact. For example there could be three different records.
  • You then query the data using the OData API entity PerEmergencyContact and it only returns one record even though the query may demand the three records that are visible in the UI

Environment

SAP Successfactors

Cause

The is by design. The reason for this is:


1. The records shown in the UI have the same 'personIdExternal + name + relationship'.
2. The business keys for the PerEmergencyContacts entity are 'personIdExternal + name + relationship'.
3. So from the OData API side, in this situation the multiple records will be treated as one record to be returned.
4. The OData framework states that only one record will be returned if there are several records with the same business key.
    Other duplicate records will be removed in the OData API query call.
5. So it's the design behavior of the API .

Resolution

The Workaround for this issue is:

  • You can configure multiple custom string fields to store multiple phone/email information for the same Emergency contact instead of creating duplicate records.

See Also

If you go to PerEmergencyContacts in the following documentation you can see it states the business keys:

http://help.sap.com/saphelpiis_cloud4hr/EN/EC_ODataAPI_Ref/frameset.htm?0d9cadf4070445d0aa805424034fc722.html

Keywords

KBA , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite all versions