function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Graeme Daley 21Graeme Daley 21 

deleted contact email address re-appearing

A strange thing is happening in the Email address field of our Contacts. After deleting an email address on saving the change the email address reappears in the Email address field. What is happening is
 
  1. Email address entered into Contact email field and saved
  2. Later need to delete the entered email address and leave the field blank.
  3. Click ‘Edit’ button or double click on Email address field
  4. Delete entered email address
  5. Click ‘Save’
  6. Deleted Email address reappears in the Email field.
 
I can edit an entered email address and save and the new edited email address remains in the field.  I can also delete the old email address, enter a totally new email address and save.  The totally new email address remains in the field.  This is all good.

The problem is just when I want to leave the email address blank.
 
I have tried using Firefox and Chrome but the problem continues with either brouser.
 
Contact Email address field is not a mandatory/required field.  Therefore, so we should be able to delete an email address when we know the email address is no longer active and no replacement email address is provided.
 
Can you suggest what is happening and what needs to be done to correct the situation.
 
Regards
Graeme.
 
Best Answer chosen by Graeme Daley 21
NagendraNagendra (Salesforce Developers) 
Hi Graeme,

Sorry for this issue you are facing.

If you don't see an onscreen prompt at the top of the record or at the field, it likely isn't a validation rule which is causing the above issue.

I would also suggest you head into the Admin Setup and search Workflow. From there, select Workflow Rules and look to see if there are any currently in use (you can also navigate there by going to Build > Create > Workflows & Approvals > Workflow Rules). There could be a workflow rule that is preventing the record from being deleted unless it is replaced by another email address. 

I would also check Process Builder (under the same Create > Workflows & Approvals menu). There could be a process in place as well. 

Faced a similar issue in the past and  It was a workflow rule that was preventing the field from being blank. I deactivated the rule and now I can erase an email from the field without a problem.I found that the workflow rule which effectively turned off this restriction from clearing out an email field was: "Email only: Paste to Work"  Once deactivated, I was able to empty out the email field and set preferred email to none and save these changes.

finally, if that doesn't help then I would recommend checking if anywhere this email is used in your Org's apex code.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra

 

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Graeme,

Sorry for this issue you are facing.

If you don't see an onscreen prompt at the top of the record or at the field, it likely isn't a validation rule which is causing the above issue.

I would also suggest you head into the Admin Setup and search Workflow. From there, select Workflow Rules and look to see if there are any currently in use (you can also navigate there by going to Build > Create > Workflows & Approvals > Workflow Rules). There could be a workflow rule that is preventing the record from being deleted unless it is replaced by another email address. 

I would also check Process Builder (under the same Create > Workflows & Approvals menu). There could be a process in place as well. 

Faced a similar issue in the past and  It was a workflow rule that was preventing the field from being blank. I deactivated the rule and now I can erase an email from the field without a problem.I found that the workflow rule which effectively turned off this restriction from clearing out an email field was: "Email only: Paste to Work"  Once deactivated, I was able to empty out the email field and set preferred email to none and save these changes.

finally, if that doesn't help then I would recommend checking if anywhere this email is used in your Org's apex code.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra

 
This was selected as the best answer
Graeme Daley 21Graeme Daley 21
Greetings Nagendra,
Thank you for your quick reply.  You were absolutely correct.  There were in fact a couple of Workflow Rules which were/are causing the email address to re-appear.  I can deactivate the workflows but I will need to first investigate why the workflow rules were set up as they were.

So thank you again.  As a relative 'newbie' with Salesforce I really appreciate the help I've receive from people like yourself in the community.

Regards
Graeme.