Overview
This error can occur either in the M-Files Desktop UI or be put into the Windows Event Viewer. This error can occur whenever a date is outside of the range of what M-Files can display. Generally years less than 1,000 or years greater than 9,999 will produce this error. We have seen this error occur with Learning Rules where the time unit was set to Year and the number of units was set to 9,999.
This can happen for any date field that has an automatic addition or subtraction inside of the Compliance Kit.
System.Runtime.InteropServices.COMException (0x80040001): The added or subtracted value results in an un-representable DateTime.
Parameter name: months
CoVaultObjectOperations.cpp, 604, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
ServerVaultObjectOperationsHelper.cpp, 65, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCObjectOperationsHelper.cpp, 283, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
CoRPCOverCOM.cpp, 5251, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperations.cpp, 5734, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
MCallInLoop.h, 358, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 4192, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 4027, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 10932, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 11863, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 12084, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 28259, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 28388, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 10949, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 12084, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 28259, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 28388, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 10814, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 11315, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
VaultDBSessionEvents.cpp, 377, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
VaultDBSessionEvents.cpp, 1551, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 269, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 328, Script execution failed. ((BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges: 120-92438-3)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 328, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
VaultScriptSessionTemplates.cpp, 500, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
CoActiveScriptSite.cpp, 903, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
CoActiveScriptSite.cpp, 745, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
BeforeCheckInChanges::MFiles.ComplianceKit.MFEventHandlerBeforeCheckInChanges, 22, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
CoDynamicCLRObjectWrapper.cpp, 542, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
CoDynamicCLRObjectWrapper.cpp, 317, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
ManagedError.cpp, 129, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
VaultApplicationBase.cs, 224 (IL:88), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
VaultApplicationBase.cs, 642 (IL:1), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
VaultApplicationBase.cs, 669 (IL:101), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
MethodInfo.cs, 228 (IL:116), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
TrainingModule.cs, 146 (IL:60), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
TrainingRecord.cs, 220 (IL:21), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
TrainingRecord.cs, 1048 (IL:203), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
TrainingRecord.cs, 616 (IL:60), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
DynamicTimeSpan.cs, 65 (IL:67), The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
M-Files Compliance Kit 3.1.810.4: [System.DateTime AddMonths(Int32)], IL:127, The added or subtracted value results in an un-representable DateTime.
Parameter name: months (0x80131502)
(M-Files 19.1.7279.5)
Solution
The resolution to this issue is to have the customer set more appropriate dates and addition/subtraction units. 100-200 should be more than enough for document or object that needs to expire "never".
