SAP Knowledge Base Article - Public

2980928 - Unable to Retrieve Organisational Units of Partner Contacts Using OData

Symptom

Via OData, you want to fetch the department of a Partner Contact. But  PartnerContactCollection doesn't provide the relevant information, although the Department field is filled in the UI

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to Partner work center
  2. Go to Partner Contacts view
  3. Select the required partner contact ID
  4. Find Department field filled
  1. Run the OData Get request:  https://myxxxxx.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/PartnerContactCollection?$filter=PartnerContactID eq 'abc'
  2. > Department field is included in the result, but it is empty

(https://myxxxxx.crm.ondemand.com represents the system url and ABC represents the Partner Contact ID)

Cause

The field Department in the partnercontactcollection relates to department field from business card only. The requested organisational unit assignment is currently not available in the PartnerContact OData service.

Resolution

As a workaround, you may use the ServiceAgent OData service, entity type ServiceAgentOrganisationalUnitAssignmentCollection. This service does contain the organisational unit assignment, and since every partner contact is a service agent, the correct data should be returned. The object ID to use is the same for both.

Keywords

Unit, For, Not possible, Incorrect, wrong, Result, PartnerContactCollection,  PartnerContactSalesResponsibilityCollection, OrganisationalUnits, PartnerContact. , KBA , LOD-LE-BP-BP , Business Partner , Problem

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications 2008