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
RedSalesRedSales 

Using a Formula to populate a default value in an Email Field.

Hi, I wish to create a field of type "Email" and to populate this field with the Email address of the object creator. As there is a formula option when creating a field to populate the default value I thought I could use this to populate the field.  I therefore tried the following in the in the formula box for my Email Field.

 

CreatedBy.Email

 

However I get an error "Error: Field CreatedBy does not exist. Check spelling" when I try this out.

 

As formula fields can't be of type email I thought it would be handy if I could instead use the formula box/option in my Email Field to populate this.

 

Do you know if this should be allowed? If not will I require a workflow rule to populate this (it seems unnecessary to be honest).

 

Thanks in Advance. 

Best Answer chosen by Admin (Salesforce Developers) 
DeepeshDeepesh

It works. Are you inserting a field in formula box or just typing it in?

It should work either way, but just try picking it from the list box and inserting it in formula box.

All Answers

DeepeshDeepesh

It works. Are you inserting a field in formula box or just typing it in?

It should work either way, but just try picking it from the list box and inserting it in formula box.

This was selected as the best answer
skodisanaskodisana

Hi,

 

I guess you are trying to create a text field with Default Value. This field value is used to populate when users are click new button, Since you would not known at this time created of the record.

If you want to use this use Formula (text) data type field and use CreatedBy.Email. This should work. 

 

Thanks,

Srikanth. K

RedSalesRedSales

Hi,  Choosing the field from the list box resolved my issue.

 

Thanks!