1

I am not too good with formulas but i have a workflow and i need to create a formula on my field update that will update my custom field "End Date" 10 years ahead in the future.

2 Answers 2

1

you don't need workflow here, as it can be implemented by means of formula field. Formula for your "End Date" field is:

DATE( 
YEAR(DateField) + 10, 
MONTH(DateField), 
DAY(DateField)
 )
0

You can use addYears() method of DataTime.

DateTime newDate = System.Now().addYears(1);

DateTime Methods documentation: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_datetime.htm

Hope this helps :)

1
  • 1
    There is no add years in a wfr formula, only apex
    – Eric
    Jun 7, 2017 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .