Symptom
You are upserting PerPhone via OData API and you're getting error below:
Only one record can be set as primary record for XXXX
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
SAP SuccessFactors HCM Suite
Reproducing the Issue
- I currently have data in UI showing as below:
2. My request payload below is saying that I would like to change the current isPrimary of phonetype 10606 from 'true' to false
{
"__metadata": {
"uri": "https://apisalesdemo4./odata/v2/PerPhone(phoneType='10606',personIdExternal='109031')",
"type": "SFOData.PerPhone"
},
"areaCode": "123",
"isPrimary": false,
"phoneNumber": "21432122"
}
3. And the response was:
<d:message>Only one record can be set as primary record for XXXX.
Failed record info: {PerPhone/areaCode=XX, PerPhone/isPrimary=false, PerPhone/phoneNumber=XX, PerPhone/personIdExternal=XX, PerPhone/phoneType=XX}.
for Key PerPhone/personIdExternal=XX,PerPhone/phoneType=XXXwith the index 0</d:message>
I've also tried to update this via UI but got the same error:
Cause
This is expected behavior. There should be one active Primary phone information.
Resolution
- In your request payload, include both current records. and change the value of is primary for both phonetypes. See example below:
Current data:
phoneType='10604'
"isPrimary": false,
Value to in your request payload:
phoneType='10604'
"isPrimary": true
Current data:
phoneType='10606'
"isPrimary": true,
Value to in your request payload:
phoneType='10604'
"isPrimary": false
- In SuccessFactors Import Data page, you can do the same. See sample screenshot of excel file below:
See Also
Keywords
Only one record can be set as primary record for user XXXX, PerPhone, primary, phone, record. , KBA , LOD-SF-INT-INC-ODATA , ODATA API In Integration Center , Problem
SAP Knowledge Base Article - Public