Communication Completed Time Updates to Current Time

In a communication regardless of whether there is a value in the Completed Time Field this field is always updating to the current date. When you have the field set to readonly=true; in the Creation Script... I need this not to happen... I want the coding to update the field as it should, but after the status field has been set to completed if they change anything other than the status field from complete if should not update the completed time date. Help!

Parents
  • 0

    Damien

    I am just going to focus on Tasks within my response. (This is longer that I intended but skip to the end for the conclusion).

    When a Task is created the following date/time fields are available to be edited.

    Due Date/Time (comm_datetime)

    Start Date/Time (comm_todatetime)

    Reminder Date/Time (comm_notifytime)

    These fields are contained in the default New Task screen within the screen 'CommunicationSchedulingBox'.

    In a default system none of these fields have an scripting associated with them.

    The field comm_datetime is defined as defaulting to the Current Date/Time.

    The field comm_todatetime is defined as defaulting to 30 minutes after the value of Current Date.

    The field comm_notifytime has no default.

    When the task is saved other date time fields are updated

    comm_createddate (This value is shown on the Communication Summary Screen).

    comm_updateddate

    comm_timestamp

    These are all system fields used in the management of the data.

    There are other date time fields (comm_originaldatetime, comm_originaltodatetime) that are associated with integrations.

    When a Task has its comm_status changed to 'Completed' and saved the value in Completed Time (comm_completedtime) is updated. This value will be the same as the comm_updateddate.

    This can be seen in the SQL that is generated

    e.g.

    UPDATE Communication SET comm_type=N'Task',comm_opportunityid=NULL,comm_caseid=NULL,comm_orderid=NULL,comm_quoteid=NULL,comm_action=N'ToDo',comm_subject=N'do this now',comm_note=N'do this now stuff more',comm_status=N'Complete',comm_priority=N'Normal',comm_secterr=-2113929208,comm_private=NULL,comm_createdby=1,comm_createddate='20180216 06:57:00',comm_organizer=1,comm_projectid=NULL,comm_datetime='20180216 07:25:00',comm_todatetime='20180201 12:00:00',comm_isalldayevent=NULL,comm_taskreminder=N'Y',comm_notifytime='20180201 12:00:00',comm_smsnotification=NULL,comm_channelid=5,Comm_Exception=N'Y',Comm_NotifyDelta=NULL,Comm_PercentComplete=100,Comm_CompletedTime='20180216 07:27:43',comm_UpdatedBy=1,comm_TimeStamp='20180216 07:27:43',comm_UpdatedDate='20180216 07:27:43' WHERE (Comm_CommunicationId=485)

    Comm_completedtime does not have a default value defined in meta data. (Default values are only applicable to the creation of new records).

    Comm_completedtime is contained within the screen 'CustomCommunicationDetailBox'. There are no field level scripts associated with this field.

    Conclusion

    You can't control the comm_completedtime field. This is linked to the value in the comm_updateddatetime (and comm_timestamp) field and can't be changed. You could created your own field that is updated by a table level script only when the value of comm_status is first entered (or updated) to 'Complete'.

Reply
  • 0

    Damien

    I am just going to focus on Tasks within my response. (This is longer that I intended but skip to the end for the conclusion).

    When a Task is created the following date/time fields are available to be edited.

    Due Date/Time (comm_datetime)

    Start Date/Time (comm_todatetime)

    Reminder Date/Time (comm_notifytime)

    These fields are contained in the default New Task screen within the screen 'CommunicationSchedulingBox'.

    In a default system none of these fields have an scripting associated with them.

    The field comm_datetime is defined as defaulting to the Current Date/Time.

    The field comm_todatetime is defined as defaulting to 30 minutes after the value of Current Date.

    The field comm_notifytime has no default.

    When the task is saved other date time fields are updated

    comm_createddate (This value is shown on the Communication Summary Screen).

    comm_updateddate

    comm_timestamp

    These are all system fields used in the management of the data.

    There are other date time fields (comm_originaldatetime, comm_originaltodatetime) that are associated with integrations.

    When a Task has its comm_status changed to 'Completed' and saved the value in Completed Time (comm_completedtime) is updated. This value will be the same as the comm_updateddate.

    This can be seen in the SQL that is generated

    e.g.

    UPDATE Communication SET comm_type=N'Task',comm_opportunityid=NULL,comm_caseid=NULL,comm_orderid=NULL,comm_quoteid=NULL,comm_action=N'ToDo',comm_subject=N'do this now',comm_note=N'do this now stuff more',comm_status=N'Complete',comm_priority=N'Normal',comm_secterr=-2113929208,comm_private=NULL,comm_createdby=1,comm_createddate='20180216 06:57:00',comm_organizer=1,comm_projectid=NULL,comm_datetime='20180216 07:25:00',comm_todatetime='20180201 12:00:00',comm_isalldayevent=NULL,comm_taskreminder=N'Y',comm_notifytime='20180201 12:00:00',comm_smsnotification=NULL,comm_channelid=5,Comm_Exception=N'Y',Comm_NotifyDelta=NULL,Comm_PercentComplete=100,Comm_CompletedTime='20180216 07:27:43',comm_UpdatedBy=1,comm_TimeStamp='20180216 07:27:43',comm_UpdatedDate='20180216 07:27:43' WHERE (Comm_CommunicationId=485)

    Comm_completedtime does not have a default value defined in meta data. (Default values are only applicable to the creation of new records).

    Comm_completedtime is contained within the screen 'CustomCommunicationDetailBox'. There are no field level scripts associated with this field.

    Conclusion

    You can't control the comm_completedtime field. This is linked to the value in the comm_updateddatetime (and comm_timestamp) field and can't be changed. You could created your own field that is updated by a table level script only when the value of comm_status is first entered (or updated) to 'Complete'.

Children
No Data