Email Address as a required field in Leads, Contacts and Accounts

Hopefully a very simple question

We have the Email Address set in all three modules to be a required field

But we can create any of the three from blank without completing it

But when you then edit the record, the system enforces the requirement

Why it is not being enforced when creating a new record as all other fields are?

Thanks

On which SuiteCRM version?

Where are you creating the record from? Exactly which screen, which button?

Thanks

1 Like

Appreciate your help

V 7.10.9

View in any of the List Views
Then top left navigation “Create Lead” or Contact etc.

Initial creation does not enforce
But editing the record after does enforce.

You are correct, I can reproduce the bug on 7.10.10.

I think this has something to do with the fact that the email field is a bit special, the field is called email1 in the database, but it’s just a proxy for the primary email. The actual emails are saved as a one-to-many relationship, so that each record can have more than one email.

Some of that logic seems to be faulty when you change the field to “required”. Note that there is no way to change relationships to “required”, which would be the thing to try next. So I am not sure we can really solve this easily.

You can try working around this by adding some validation onto the view’s javascript (requires coding):

https://gunnicom.wordpress.com/2015/09/21/suitecrm-sugarcrm-6-5-add-custom-javascript-field-validation/
or maybe this other one
http://sugarmods.co.uk/how-to-add-custom-validation-to-form-fields-in-sugarcrm/

Any way, if you can please open a new issue with this on Github, with detailed “steps to reproduce” I would appreciate it.

1 Like

Thank you

I shall pass this to a more experienced developer here and will raise it in GitHub
At least the way the client is using it means that an Adviser HAS to edit the Account and Contact once converted and that is then enforced.

Kind regards
Tony