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
Rupesh A 8Rupesh A 8 

How to update date field to currentdate + 90 days, whenever record is created into object

Hi,

I have one custom object, in that I have one date field like "Valid date" with date datatype. Here whenever I insert one new record into that that "Valid date" field should update date like today's date + 90 days.

How to acheive this, can anyone help me out?
Thanks.
Best Answer chosen by Rupesh A 8
sandhya reddy 10sandhya reddy 10
Hi Rupesh,

You can acheive this using workflow rule to update feild.

1. Build a new workflow rule with the following criteria.
 
Object: 
your custom object

2.Evaluate this rule: 
select created
 
Rule Criteria: 
 when the Formula Evaluates to true

write true.
 
4. Update the date field "Valid date"
 
5. The formula value for the update should be:
 
TODAY() +90
 
 
6. Activate the rule

using formula TODAY()+90;

please refer below link for workflows

https://help.salesforce.com/htviewhelpdoc?id=customize_wf.htm&siteLang=en_US

Please let us know if this helps you.

Thanks and Regards
sandhya

All Answers

sailee handesailee hande
Hi Rupesh,

Instead of using date datatype you can do this using formula field like CreatedDate + 90 and give its return time as Date or Date/Time.If this helps then plz let me know.

Thanks,
Sailee
Veenesh VikramVeenesh Vikram
Yes, You may write a Simple WorkFlow Rule.

The Rule should be evaluate "When the Record is Created".
The Rule Criteria should run "when the Formula Evaluates to true".
Write true in the formula editor (So that the rule fires always).
Save the Workflow Rule.

Add a Workflow Field Update , which will update the "Valid Date" field.
While Specifying new value for the field, "Use a formula to set the new value"
In the Formula Editor, Write: TODAY() + 90


Hope this Helps! Kindly mark as solution if it does.
Veenesh
sandhya reddy 10sandhya reddy 10
Hi Rupesh,

You can acheive this using workflow rule to update feild.

1. Build a new workflow rule with the following criteria.
 
Object: 
your custom object

2.Evaluate this rule: 
select created
 
Rule Criteria: 
 when the Formula Evaluates to true

write true.
 
4. Update the date field "Valid date"
 
5. The formula value for the update should be:
 
TODAY() +90
 
 
6. Activate the rule

using formula TODAY()+90;

please refer below link for workflows

https://help.salesforce.com/htviewhelpdoc?id=customize_wf.htm&siteLang=en_US

Please let us know if this helps you.

Thanks and Regards
sandhya
This was selected as the best answer
Rupesh A 8Rupesh A 8
Thank you everyone, it's working fine.