Answered by:
CRM 4.0 Appointment Durations

Question
-
When creating a service activity for more than 10 days, we are getting and error that states "The duration of the appointment is invalid." It will save by clicking the Ignore and Schedule button, but is there a way to change this limit?
Thanks!
Tuesday, July 20, 2010 4:12 PM
Answers
-
Hi Fruscus
Instead of update the database direct,you can using the tool here to set the duration more than 10 days.
it is using the CrmService to update the organization,so it is really supported!
organization organization = new organization();
organization.organizationid = new Key();
organization.organizationid.Value = organizationGuid;
organization.maxappointmentdurationdays= new CrmNumber();
organization.maxappointmentdurationdays.Value = 20;
service.Update(organization);
Batistuta Cai | MSCRM MVP | www.techsun.com- Proposed as answer by Batistuta CaiModerator Wednesday, July 21, 2010 2:37 AM
- Marked as answer by Fruscus Wednesday, July 21, 2010 12:45 PM
Wednesday, July 21, 2010 12:43 AMModerator
All replies
-
I would advise you to create 10 one day service activities rather than 1 ten day service activity. This is because duration is stored in minutes. So a ten day service activity has a duration of 14,400 minutes -- this makes it appear as if the resource worked for 24 hours a day for ten straight days. CRM has no notion of business days. And I don't believe there is a way to increase the limit you are experiencing.
Neil Benson, CRM Addict and MVP at Customery Ltd.You can reach me on LinkedIn or Twitter.
Tuesday, July 20, 2010 4:20 PMModerator -
Hi,
the limit is changeable here (it is a supported change):
Database: [Organization]_MSCRM
Table: OrganizationBase
Field: MaxAppointmentDurationDays
Default value: 10
Tuesday, July 20, 2010 5:23 PM -
Hi Fruscus
Instead of update the database direct,you can using the tool here to set the duration more than 10 days.
it is using the CrmService to update the organization,so it is really supported!
organization organization = new organization();
organization.organizationid = new Key();
organization.organizationid.Value = organizationGuid;
organization.maxappointmentdurationdays= new CrmNumber();
organization.maxappointmentdurationdays.Value = 20;
service.Update(organization);
Batistuta Cai | MSCRM MVP | www.techsun.com- Proposed as answer by Batistuta CaiModerator Wednesday, July 21, 2010 2:37 AM
- Marked as answer by Fruscus Wednesday, July 21, 2010 12:45 PM
Wednesday, July 21, 2010 12:43 AMModerator -
@Batistuta: fyi - changing the value directly in the database is part of a supported solution, which is provided by Microsoft Support. But you are correct, the setting is also changeable with help of the organization class.Wednesday, July 21, 2010 3:30 AM
-
This worked perfectly. Thanks for your help!!Wednesday, July 21, 2010 12:46 PM