I have a class that is looking for contracts 30 days before the end Date.
My problem is i am trying to build a test for this class, and in that i'm trying to create a contract where the End Date is 30 days ahead of today's date. No matter what i set the contract Term as, the endDate is always getting set as a year from today, rather than from the contract StartDate and the Term.
Does anyone have any suggestions here?
contract con = new contract();
con.StartDate =system.today().addMonths(-11);
con.ContractTerm=12;
insert con;
con.Status = 'Activated';
update con;
system.debug(con.StartDate+'<-----------Start End----------->'+ con.EndDate);
Debug line: 14:22:41:910 USER_DEBUG [64]|DEBUG|2017-12-13 00:00:00<-----------Start End----------->2019-11-12 00:00:00