SAP Knowledge Base Article - Public

3690711 - Error "ElmsCreateException in updateUserPreferences()" occurs when updating user custom fields via Learning API

Symptom

The error occurs when trying to update custom fields for certain users using Learning API calls. 

Error Code:

500 Internal Server Error

"error":{

"code": null,

"message": "ElmsCreateException in updateUserPreferences()"

Environment

SAP SuccessFactors Learning.

Web Services OData. 

Reproducing the Issue

  1. Retrieve the Client Secret. 
  2. Establish a Learning API connection using the Rest Client.
  3. Execute PUT /learning/odatav4/user/v1/Users('') with the request body to update custom fields for the user. 
  4. Observe the error message: "ElmsCreateException in updateUserPreferences()". 

Cause

  • The user lacks locale and date/time format settings in their preferences.
  • Locale and date/time format settings exist in Learning Administration interface but are missing in the database table.

Resolution

Verify that the affected users have locale and date/time format settings in their preferences.

  • If preferences are correctly set in Learning Administration interface, check the database tables ('PA_USER_PREFERENCE' and 'PA_USER_PREFERENCE_DTE_PATTERN') to confirm alignment with Learning Administration interface. 
  • If discrepancies exist, update the user's preferences in Learning Administration. 

If no records are found in the database table for the users, follow these steps: 

  1. Access the Learning Administration interface.
  2. Navigate to People -> Users -> Search for the affected user and open the record. 
  3. Under the 'Preference' tab, set temporary values for Locale, Date Pattern ID, and Time Pattern ID, then save the changes. 
  4. Revert the Locale, Date Pattern ID, and Time Pattern ID to the correct values and save the changes again.
  5. Test the API call to update the user's custom fields to ensure successful updates.

See Also

Keywords

LMS API error, ElmsCreateException, updateUserPreferences, custom fields, user preferences, locale settings, database mismatch, troubleshooting steps, SAP Learning API, LMS UI preferences, PA_USER_PREFERENCE table, PA_USER_PREFERENCE_DTE_PATTERN table, error resolution, user preference update, API error handling, database validation.  , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions