I'm trying to create a unique email constraint on our Contact object, the general consensus seems to be to create a new, unique custom field, and copy the Email field into it via a trigger or workflow.
I did this successfully in a sandbox, and added the elements to a change set to deploy into the Production environment.
The deployment failed with the message:
Can not specify 'caseSensitive' for a CustomField of type Email
When I mark an email field as "Unique" I'm not asked to specify the case sensitivity (unlike Text fields), but using workbench I can confirm that the field is marked as
caseSensitive = true.
To be honest I'd prefer the field to case insensitive, so this would appear to be an issue with the UI, but other than creating my field as a text field and setting the case sensitivity myself, is there a work around that will allow me to continue working with the Email field type?
Edit to note
Turns out that my sandbox instance had been updated (to Spring '19) while Production hadn't, resetting the sandbox to the same version as Production (Winter '19) allowed the deployment to complete even though the email field was still "case sensitive".