In my project, we need to display all users in a dropdown list. While exploring ODC, I noticed that the System User entity does not contain some important attributes like Password and Mobile Number, which are required for our use case.In OutSystems 11, we could directly use the User entity from the System module, but in ODC this option is limited.👉 My questions are: 1. What is the best practice to maintain user management in ODC when additional fields (e.g., mobile number) are required? 2. Should we create a custom User entity with extra attributes and map it with the ODC User entity? 3. How can we handle dropdowns and authentication in such cases without duplicating data?
Hi @vinita verma ,
The recommended approach is the same as in O11: create an extension entity with a 1:1 relationship to the Users entity.
Correct.
You can implement logic to handle user registration, including the additional fields. For existing users, you can provide a profile section where they can add or update the extra information.
Some articles that can help you:
OS-BERT-00000 - 23505: 23505: duplicate key value violates unique constraint "osprk_ifelxbb1bzo_userd_0gf1247fb4qcwj5e3p55kdb5" DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
getting this error. how can i resolve this?
This error occurs when you insert or update a record where the value of a field marked with a Unique Index or Primary Key already exists in the database.
Could you share or describe your logic flow? You should be creating records in your new entity, not in the Users entity.
When I debug server logic when I found user details create is throwing this error
I am not able to resolve this error
Could you share your OML or a sample one? I’m not sure I follow what you’re doing with that loop. Why are you iterating through the UsersDetails aggregate? You should loop through the original Users aggregate and then create the UsersDetails records from there.