SAP Knowledge Base Article - Public

2912439 - Document Category field is empty after working in attachments uploaded by API - SuccessFactors OData

Symptom

You are seeing some issues in the Attachment OData entity for the field documentCategory.

The field value documentCategory is blank (no value / null) after your OData API successful upsert (which included this data).

Environment

  • SuccessFactors HXM Suite
    • OData API - Attachment entity

Cause

The fields ownerIdType, documentCategory and documentEntityType should be matched. 

Resolution

If you use USERSSYS_ID, but d:documentCategory and d:documentEntityType are not matched, system will set default values (like blank or null values).

In one testing, we tried upserting the attachment with field "ownerIdType": "USER_ID" and we were having the problem. 

Checking internally with engineering team they asked us to either remove 'ownerId' and 'ownerIdType' from the request payload, or change ownerIdType to 'PERSON_ID", so we upserted another attachment with the following fields in the payload:

<d:userId>10009999</d:userId>
<d:documentCategory>NATIONAL_ID</d:documentCategory>
<d:documentEntityType>PERSON</d:documentEntityType>
<d:module>HRIS</d:module>
<d:moduleCategory>HRIS_ATTACHMENT</d:moduleCategory>
<d:fileName>Test.pdf</d:fileName>
<d:fileContent>"XXXXX..."< /d:fileContent>
 
The upsert above status was OK.
 
Doing query in the attachment by its Id we confirmed that the 'documentCategory' and 'documentEntityType' were both correct now.

Keywords

Document Category field, documentCategory, OData API uploaded documents, attachment, files, SuccessFactors HCM HXM Suite, Integration, entity, empty, null, no value, upsert , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors HXM Suite all versions