I am somewhat new to formulas. I have a formula field created on the activities object that is supposed to return a date. I am getting a syntax error when I check the syntax checker.
My formula field has the following code:
if ((task.appraisal_vehicle__c != null) && (SomeOtherClass.APPRAISAL_REC_TYPE.equalsIgnoreCase(task.Type)){
return task.CreatedDate().addDays(7).format();
}
Ideally it adds 7 days to the task.CreatedDate() field and returns that when task.appraisal_vehicle__c is not null and task.Type is equal to a constant defined in another class.
I am not sure why and I even dumbed my code down to:
if (appraisal_vehicle_Number__c != null && Type !=null){
}
and still the same. I think this may be due to my confusion with Tasks & Activities. Not sure what I am doing wrong.