
|
Hi, Please can anyone can guide me to resolve the issue. Suddenly dont know for what reasons started getting this issue. ISSUE : On lead form I have 5- 7 date time fields. yone or more fileds (Date time fields) is updated/changed and I try to save the form get below error. Resolutions Tried : 1. Diabled all scripts on lead page. 2. Diabled all plugins. 3. Deactivated all workflows. 4. Imported old customizations files in system (Backup file taken before last customizations update) Still facing the same issue detailed below. Microsoft CRM Error Report: |
|
Error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception of type 'System.Web.HttpUnhandledException' was thrown.
Error Number:
Not available
Not available
|
| Request URL:
Any help or Suggestions are appreciated. Regards, Sarfaraj
|
*This post is locked for comments
I have the same question (0)Hello Sarfaraj,
According the error message above.
[FormatException: String was not recognized as a valid DateTime.]
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
"String was not recognized as a valid DateTime".
It seems that one of the field string that reflects the data and time is not in the correct format as this is failing when the function (System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) is called.
I would suggest if we are changing or updating the Date Time value, then verify and confirm if we have entered the DataTime field in correct format.
Other way :
Try applying date and time functions on that variable. I mean try converting the value in the variable to a date and time.
Remember CRM converts between UTC (on the database) and local time (adjusting for DST) for display on forms. When looking at the value of dates while debugging your code you need to know whether you are looking at a UTC or local DateTime to know whether it is 'correct'. You can find out by looking at the DateTime.Kind property.
For more help.
social.microsoft.com/.../string-was-not-recognized-as-a-valid-datetime
I hope this helps.
Thank You !