Jira Code: TRUS-43
Description:
There are 3 custom fields Next Renewal Date, Initial Renewal date,
Previous renewal date. The workflow should set the field value
Next Renewal Date to the field according to the below condition.
Next Renewal Date = Initial Renewal date same day next year if the previous renewal date is empty
Next Renewal date = Previous renewal date same day next year if previous renewal is updated.
Workflow:
TRIGGER TYPE
Before Record Load
State:
Action 1:
TRIGGER ON
After Field Edit
CONDITION
Previous Renewal Date Is Empty
Next Renewal Date=nlapiDateToString(nlapiAddDays(nlapiStringToDate({custentity_init_app_date}), 365), ‘date’ )
Action 2:
TRIGGER ON
After Field Edit
CONDITION
Previous Renewal Date Is Not Empty
Next Renewal Date=nlapiDateToString(nlapiAddDays(nlapiStringToDate({custentity_prev_renew_date}), 365), ‘date’)