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
Pratap adminPratap admin 

changing the field type of custom object

Hi,

In my current application, we are using a Email field type to store cusomer email. As per current reuirement , customer wants to enter multiple email id in the existing field.

This email field is already being used in few visulforce pages and apex classes. 
Is it possible to change this email field to Text area or any workaround to get the solution?

Please advice.

Thanks in Advance
BalajiRanganathanBalajiRanganathan
As of now it is not possible to store multiple email address in one field,
you need to create new fields to store additional emails.

https://success.salesforce.com/ideaView?id=08730000000aSkVAAU

 
Cory CowgillCory Cowgill
So as Balaji says you can't do that with an email field. The proper way to do this is to create either:

1. Create Multiple Email Fields on the object. (Recommended)
2. Create a Custom Object that hangs off this object which stores emails for 1 - Many relationship to this guy. Each Custom Object would have an Email Field, etc. (Depends on requirements, sometimes this approach makes sense if you have more than a handful of additional emails per record).

To give some additional context on why a text field is a very bad approach:
There are some special features that an email field gives you that a text field does not.

1. They automatically validate that an email address syntax is accurate. Anyone who has moved over legacy CRM data into SFDC knows that sales people enter bad email addresses (typos, misssing .com, etc) in older CRM's. SFDC helps keep these clean by validting them for you without any work on you part.

2. If you use any of the outbound email functionality in SFDC you can enable "Bounce Email" functionality. What this does is that anytime you send an email in the system to using that email address, if the email address sends a bounce back email the field will automatically show a ! symbol, and text telling the user that the email is bouncing back undelivered.

Hope that helps.