0

On a Agreement object I have End Date(date-data type) field , Auto Renew(checkbox), Terms months(number-data type), No of Terms(Data type-Number). End date should be updated based on Term month field when Auto Renew is checked.

For ex: If End date=14/07/2020 ,Contract Term Month= 12, no of terms=3, the end Date should be 14/07/2021 when Auto Renew is checked. On 14/07/2021 agreement should get auto renewed and end date should be 14/07/2022, on 14/07/2022 agreement should get auto renewed and end date should be 14/07/2023 and so on based on no of Terms value. No of Terms is for how many times it should get auto Renewed and based on that end date field should be auto updated with new value.

In Workflow condition I selected Formula evaluates to true and specified the condition i.e Auto Renew=True.Action part I gave the below condition. ADDMONTHS( End_Date_c, Term_month___c)

But I got stuck how to specify No of terms field.

Thanks in advance!

4
  • You can add a custom field to track which term it is currently in now. Commented Jul 14, 2020 at 8:58
  • @HengkyIlawan You mean to add No of Terms in Workflow action. The ask from the customer is to End date field based on Contract Term field and it should auto update with new value as per No of Terms field
    – Santhiya
    Commented Jul 14, 2020 at 9:13
  • i meant you need a way to indicate in which term you are currently in now (which I mentioned previously to track it with a custom field). So if the current term already equals to No of Terms, then your workflow should not be triggered anymore. Commented Jul 14, 2020 at 9:21
  • @HengkyIlawan I am new to salesforce. Sorry I got stuck at tracking which term we are currently
    – Santhiya
    Commented Jul 17, 2020 at 15:36

1 Answer 1

0

You need another field to keep track of which term the Agreement is currently in. Current fields:

End date = 14/07/2020
Contract Term Month = 12
No of Terms = 3

Add another field, for example:

Current Term = 1

So in your workflow, add another field update to increase the Current Term upon renewing the End Date. You renewal workflow then has to have a validation, only execute when Current Term < No of Terms.

You must log in to answer this question.

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