SAP Knowledge Base Article - Public

3232251 - Error message 'You do not have permission to save the form data for Key" when upserting against custom element - Performance Management

Symptom

OData Upsert request for an entity "FormCustomElement" is failing with below error message:

upserted failed: You do not have permission to save the form data for Key FormCustomElement/elementKey=ele_XXX,FormCustomElement/formContentId=XXXXX,FormCustomElement/formDataId=XXXX,FormCustomElement/itemId=XX,FormCustomElement/sectionIndex=XXX with the index XXXX

Environment

SAP SuccessFactors Performance Management

Reproducing the Issue

  1. Launch a performance form for a user
  2. Upsert against "FormCustomElement" via API using employee tokens (generated by formSubjectId/userId)
  3. Receives failure message "upserted failed: You do not have permission to save the form data for Key FormCustomElement/elementKey=ele_XXX,FormCustomElement/formContentId=XXXXX,FormCustomElement/formDataId=XXXX,FormCustomElement/itemId=XX,FormCustomElement/sectionIndex=XXX with the index XXXX "

Cause

Possible causes:

  1. User with "Admin access to Forms OData API" permission trying to edit forms that are in other user's inbox;
  2. Not upserting to the latest content id;
  3. User does not have "write" permission to the field (configured in form template).

Resolution

Important prerequisite: the form is in the inbox of the user who is going to upsert data.

1. User with "Admin access to Forms OData API" permission is allowed to query the all form data of their target population but is not allowed to edit, add, or delete them. Edit action is permitted only for the forms which are in users' inbox. 

For more details on this permission, please refer to KBA 2541548.

2. If you are using employee tokens (generated by formSubjectId/userId) to upsert data to forms in employee's inbox, please consider the following: 

(1) if you are upserting to the latest content id, especially if the form has been routed several times (each routing of the form will generate a new content id);

(2)if the employee/api user has "write" permission to the field that is to be upserted.

See Also

Keywords

FormCustomElement, API, permission, Key, error message, you do not have permission to save the form data for key, Odata entity, upsert , KBA , LOD-SF-PM-API , Webservices, OData APIs , Problem

Product

SAP SuccessFactors Performance & Goals all versions