Check box true when based on conditions met

lokesh211
Tera Contributor

Hi 

 

I want to check box true which is read only based on conditions like

Planned Implementation Start Date' is greater than 'Actual Implementation Start Date' & 'Planned Implementation End Date' is less than the 'Actual Implementation End Date '.

 

I tried Business rule for this function but it's not working. 

This is the code that i used:

 

var plannedStartDate = current.getValue("start_date");
var actualStartDate = current.getValue("start_date");
var plannedEndDate = current.getValue("end_date");
var actualEndDate = current.getValue("end_date");
 
if (plannedStartDate > actualStartDate && plannedEndDate < actualEndDate) {
current.setValue("field_to_set", true);
}
else {
current.setValue("field_to_set", false);
}
})(current, previous);
 
 
Please help me in correct this code or provide any suggestions instead of BR.
Thanks in advance for providing me solution.
 
5 REPLIES 5

Hi @lokesh211 ,

 

Can u put current.update() after setting the value and check please