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
m@tT_PPMLm@tT_PPML 

Fields allowed for a Default Value Formula.

Hi everybody,

In a default value formula, we're only allowed/able to use these field types: $Organization, $Profile, $System, $User, $UserRole. Why can't we use custom fields in a default value formula?

It's all the more peculiar since it's possible to use custom fields in a validation rule formula.

VALIDATION RULE FORMULA

DEFAULT VALUE FORMULA.

jpizzalajpizzala
Yes, I imagine this is the case because default values populate when a new record is created - so technically the fields are still empty at this time.

If you have Enterprise or above, you could create a workflow rule that executes a field update upon creation of a record.  Since the fields are now populated, you will be able to use them to create the field value.  Unfortunately, the user won't see the value until the record is saved.
jbardetjbardet

THIS SUCKS!

 

I'm just trying to make a default date value using:

 

IF(CONTAINS(Name__c , "- RL"),  TODAY()+3, TODAY() + 7)

 

But in professional edition if I use a formula field, I can't make it a default but rather locked and set in stone.

 

lame!

jbardetjbardet

oh, very true. just had to use a bit of logic. it wouldn't make sense then as a default field, you're right.