I have had a couple of clients who recently have reported issues being able to update existing activities after upgrading to the SalesLogix web client. In the web server's event logs you see errors similar to this:
2011-06-10 14:22:58,872 ERROR NHibernate.AdoNet.AbstractBatcher -
Could not execute command: UPDATE ACTIVITY SET ALARMTIME = ?, LEADID =
?, LEADNAME = ?, MODIFYDATE = ?, STARTDATE = ? WHERE ACTIVITYID = ?
System.Data.OleDb.OleDbException: The statement has been
terminated. : The conversion of a datetime2 data type to a datetime data
type resulted in an out-of-range value.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
I think there is a flaw in the upgrade of SalesLogix where extra fields are added to the USER_ACTIVITY table when upgrading. These fields are not populated and thus the system is expecting values in fields that are not there. The end result are the cryptic errors about being unable to convert the datetime2 to a datetime datatype.
To fix this I have found running the following SQL statement against the database resolves the issue:
update USER_ACTIVITY set
ALARMTIME=b.ALARMTIME, MODIFYDATE=b.MODIFYDATE, CREATEDATE=b.CREATEDATE,
CREATEUSER=b.CREATEUSER, MODIFYUSER=b.MODIFYUSER, ALARM=b.ALARM from activity b
ACTIVITYID and USER_ACTIVITY.CREATEDATE is null
update activity set alarmtime=startdate where alarmtime is null
update user_activity set alarmtime=b.ALARMTIME
from activity b
and USER_ACTIVITY.alarmtime is null