SAP Knowledge Base Article - Public

2714030 - How to upsert the "isPrimary" field using SFOData.PerPhone entity

Symptom

  • You have already maintained the phone information for employee
  • Primary phone number is marked for one of the phoneType (isPrimary is set to Yes)
  • Now you have to set isPrimary to No and mark another phoneType as Primary

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

Successfactors

OData API

Resolution

Please use the purgeType option in the RequestUri of odata POST call

Procedure

  • When sending the Upsert information, pass all the phoneTypes
  • Choose the phoneType for which isPrimary needs to be marked as "false", alter the payload before passing it to API server
  • Also, mark the isPrimary field to "true" for the correct phoneType
  • Use "purgeType=Full" in the API request URI (Example: POST https://apisalesdemo4.successfactors.com:443/odata/v2/upsert?$format=json&purgeType=Full)

Before Upsert

BeforeUpsert.png

After Upsert

afterUpsert.png

See Also

Help Portal link for purgeType Option

Keywords

  • LOD-SF-INT-ODATA
  • LOD-SF-INT
  • How to upsert phone information
, KBA , how to upsert the "isprimary" field usin , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors HCM Core 1808