1

I have a requirement to update a date field on Opportunity with a following logic.

If the Opportunity status is X, then date on that custom field should be "15th Mar of the next year".

If the Opportunity status is not X, then date on that custom field should be "20th Sep of the current year".

Should I have to resort only to Apex ?

Or is this possible to be done by WF or Process Builder ?

2 Answers 2

1

You can complete this using WorkFlow as mentioned in the steps below:

  1. Firstly create a picklist named status on Opportunity and date field

  2. Create a workflow name it and set evaluation criteria as "created and every time it's edited" and set rule criteria enter image description here 3)Now Add Action as Field Update in workflow

4)Use formula to set your values enter image description here 5)Save it and check in your org

enter image description here enter image description here

0

Think this could be achieved using a formula field with a case statement case - no need for apex, process builder or anything else..

Create a formula field of type date.

CASE( Status , 'X', DATE( Year(Today()) + 1, 3, 15 ) , Date( Year(Today()), 10, 20 ) )
1
  • TODAY is a function not property i'm not sure may be property may you confirm this; Commented Apr 14, 2016 at 7:38

You must log in to answer this question.

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