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.

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
    There is no add years in a wfr formula, only apex – Eric Jun 7 '17 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.