Put the customer code as a mandatory field. When the option to automatically generate the field is disabled and the person does not enter a code, the client is created without a code and the sites associated with this client do not work.
They work fine without a code, that's how I always create them. It maybe in missing something in your description?
I went through a situation where a client was created without code and when creating the second site linked to this client when accessing always open the first site. After manually adjusting the code the sites started to open normally.
I agree that it would be a good idea to make client ID a mandatory field, especially if it causes problems. We should test that. @Croydon what do you think?
To clarify, what do you mean by 'customer code'? My comment refers to the 'Customer No.' field of the client, which should not be mandatory, nor does leaving it empty cause any issues in my use, but maybe you're referring to something else?
Issues of opening the wrong site are asked multiple times per week, the causes have nothing to do with the 'Customer No.' field.