Database uniqueness validation on a child entity

0
Hi, according to this document https://docs.mendix.com/refguide/validation-rules/ stated that “You can, however, set a validation rule to make EmailAddress unique, as that attribute only appears in the SalesEmployee entity.” However, I still encounter this error.   So, I changed the Entity from Account to User for demo_administrator and demo_user shown as below to solve the error.   Is this the best and appropriate solution to my problem?
asked
1 answers
0

Hi Teoh,
Replacing demo users with “System.user” may seem to fix the errors, But there is no email field in “System.user” entity and you cannot edit the “System.user” entity as the system module is “read only”. Its always a best approach to use the “Administration.Account” entity for creating users instead on “System.user”. You can add attributes that you want in the account entity or edit it.

Try validating email while saving the account in a microflow like the below one.  
microflow validation reference : https://docs.mendix.com/refguide/setting-up-data-validation/#custom-validation-save-button

 

 


 

answered