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
- Retrieve the Client Secret.
- Establish a Learning API connection using the Rest Client.
- Execute PUT /learning/odatav4/user/v1/Users('') with the request body to update custom fields for the user.
- 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:
- Access the Learning Administration interface.
- Navigate to People -> Users -> Search for the affected user and open the record.
- Under the 'Preference' tab, set temporary values for Locale, Date Pattern ID, and Time Pattern ID, then save the changes.
- Revert the Locale, Date Pattern ID, and Time Pattern ID to the correct values and save the changes again.
- 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
SAP Knowledge Base Article - Public