SAP Knowledge Base Article - Public

2336568 - Error message 'Only one record can be set as primary record for XXXXX' for OData API entity PerEmail Upsert operation

Symptom

Trying to Upsert in PerEmail entity and getting below error message-

PerEmailEntityUpsertError.jpg

Environment

Successfactors

Cause

Expected System behavior

Resolution

This is an expected system behavior and that is- We cannot use the same emailType to capture more than one email information irrespective of 'Primary' or 'non Primary' email id. We need to use separate email type for this.

So in order to confirm whether there is already an email entered for the same emailType as in the 'Upsert' request, you can query as follows and verify the result-

https://apiXpreview.sapsf.com:443/odata/v2/PerEmail?$select=personIdExternal,emailType,emailAddress,isPrimary&$filter=personIdExternal eq <personIdExternal> &$format=json

****<personIdExternal> in the above query should be the one from the failed upsert request.

Keywords

KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core all versions