Date fields in task and appointment

By | February 4, 2013

I see most of the new users/developers training on SageCRM face this question while they work on Appointments and Tasks module.
In sage CRM logic used for Comm_DateTime and “Comm_ToDateTime” field in Tasks/Appointment is bit difficult to understand. Developers don’t understand how the validation of date range occurs. Here I will explain you how the fields are displayed on screen and stored in database.
When it comes to Appointment’s, fields like Date/Time, End Time makes sense but for new task it doesn’t. So you need to remember simple logic here Date /Time of an appointment corresponds to Start Date/Time of a task and End Time of an appointment corresponds to Due Date/Time of Task. Here is how the screens look. You see they are reversed.

These fields are same for both types of communication (Task and Communication), but the captions are different. So, in CRM for new task, start date (Comm_ToDateTime) is treated as first date and Due date (Comm_DateTime) is as last date and accordingly the validations errors are fired
You will get more clear idea after getting look in SQL how the values are getting saved in Comm_DateTime and Comm_ToDateTime fields in database.

Hope this helps.