Set Default Date Value - Answers - Salesforce Trailblazer Community
Ask Search:
Debbie BernathDebbie Bernath 

Set Default Date Value

I created a workflow rule to update the "Expiration Date" field on a Quote.  The formula is Today () +30.

It works just fine EXCEPT that I want the value to be displayed to the User as soon as the enter a new Quote.  It only displays now after the new Quote record is saved.
Best Answer chosen by Moderator (salesforce.com) 
Jared MillerJared Miller
You could create another date field that will dafault to TODAY() +30, instead of using the standard "Expiration Date" field. 

Then you can use your workflow to update the "Expiration Date" field.

You could use 2 record-types and 2 page layouts. On creation of the quote use RT 1 and PL1 with the custom date field. Then on save, create a workflow rule to change to RT 2 and PL 2. Then use the standard "Expiration Date" field and remove the custom one from the page layout. 

But you don't have to do it that way, you can display both fields, or just one of them. 



All Answers

Steve MolisSteve Molis
 WFR do not fire until after the record is saved, that's just the way they work.
Debbie BernathDebbie Bernath
And you can not put a formula for the default value of this date field either.  Is a Trigger the only answer?
Debbie BernathDebbie Bernath
And you can not put a formula for the default value of this date field either.  Is a Trigger the only answer?
Steve MolisSteve Molis
 You could use a Formula field but again those are not visible in Edit/Create only in Detail/Read (after save)
Matthew LambMatthew Lamb
When you say "as soon as they enter a new quote", do you mean as soon as they click 'New'? Even a trigger won't help you there, as nothing's been committed to the database. 
Jared MillerJared Miller
You could create another date field that will dafault to TODAY() +30, instead of using the standard "Expiration Date" field. 

Then you can use your workflow to update the "Expiration Date" field.

You could use 2 record-types and 2 page layouts. On creation of the quote use RT 1 and PL1 with the custom date field. Then on save, create a workflow rule to change to RT 2 and PL 2. Then use the standard "Expiration Date" field and remove the custom one from the page layout. 

But you don't have to do it that way, you can display both fields, or just one of them. 



This was selected as the best answer