Symptom
When doing an upsert to update to an existing Application ID in a multi stage application instance, in response an error requires that all the mandatory fields should be provided even the hidden fields in that status the applicant is placed on.
Sample errors:
- JobApplication: UPSERT failed for the row with key: . Reason: field-id required, field-id required for external candidate as per field override, field-id required for internal candidate as per field override
- JobApplication: Mandatory value is missing for field-id for record applicationId:xxx
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 Recruiting Management
Reproducing the Issue
Update a JobApplication using ODATA upsert without providing the required fields.
Cause
This is the design of the system. OData API validates mandatory fields based on the metadata of the JobApplication entity only. The process does not consider the multi-stage field permissions defined in the Job Requisition template.
NOTE: When running an integration or API, it is expected that it will return all required fields based on attributes and override configuration even if some of the fields have data present already.
Resolution
Since 2H 2023 release, a Role-Based Permission has been introduced to allow users to skip required fields when creating/updating job applications through OData API.
Please grant the permission "Recruiting Permissions -> OData API Application Create and Update Validation Bypass for Required Fields" to the API user.
NOTE: Basic fields that identify the candidate will still be validated: firstName, lastName, country, cellPhone.
Alternative solution for Multistage application environment
By using the following configuration in a multistage application environment, it is also possible to skip the validation in API without changing the user experience on UI.
This is considered as a workaround before 2H 2023 release.
- Update the Application Template and set to required="false" all fields which is being validated while upserting via API;
- Update the Job Requisition Template including the code: required="true" for the same fields;
- With this configuration change, the API will validate the job application template as design but it will not have any required field. This change enables to run update calls with any desired field. The UI will still validate the required fields using the job requisition template what will produce the same user experience.
See Also
Keywords
ODATA, API, Upsert, Multistage, Mandatory, Required, for, Job Application, permission, bypass, skip, validation , KBA , LOD-SF-RCM-INT , Integration Center & Intelligent Services , Problem