If you have ever tried to enter a duration of more than 10 days for a service activity you would have seen that the system won’t accept this value.
The duration of the appointment is invalid
If you need to change the maximum value you are able to do this directly in the database (which is officially supported – quote of a support ticket below).
- There is no way to modify the limit for service duration via UI. We will read this value from a SQL table and there we can change the default setting.
Default value: 10
- If you overwrite this value with the needed one (for example 20) and after that perform an IISReset, the known error message (“The duration of the appointment is invalid”) will no longer occur.
This change is the recommended solution from Microsoft CRM Support and will be supported.
- Background: This field does come originally from CRM 3.0, where customer already provided feedback that the maximum duration of 10 days does not meet their need. The solution for CRM 3.0 was a solution implementation via registry key: Navigate to the following registry hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM. Create a registry key of type DWORD and name it “SchedulingEngine.MaxAppointmentDurationDays”. Provide a reasonable digit greater than 10 representing the number of days the service activity would be kept open and insure that the value is set to Decimal and not Hexadecimal. Now you can schedule an appointment with a duration value of more than 10 days.
- For CRM 4.0 you will need a manual change of the according OrganisationBase entry. Exception: If you upgrade your CRM installation from CRM 3.0 to CRM4.0, the value will be automatically carried over
Another possibility to adjust this setting is to change the organization.maxappointmentdurationdays Property via the sdk.