Microsoft KB Archive/913391

= The &quot;Actual Duration&quot; field displays an incorrect value when you view the &quot;Resolve Case&quot; dialog box in Microsoft Dynamics CRM 3.0 =

Article ID: 913391

Article Last Modified on 8/15/2007

-

APPLIES TO


 * Microsoft Business Solutions CRM Sales for Outlook, when used with:
 * Microsoft Dynamics CRM 3.0
 * Microsoft Dynamics CRM 3.0

-





SYMPTOMS
When you view the Resolve Case dialog box in Microsoft Dynamics CRM 3.0, an incorrect total time is displayed for the billable time. For example, the Actual Duration field displays the default value of 30 minutes. Additionally, when you calculate the total time spent on an incident by using the Microsoft CrmService.asmx Web service, the CalculateTotalTimeIncident message returns an incorrect total time.



CAUSE
This issue may occur because the Duration field under Scheduling information on the default Appointments form is the only editable field in that location.

Specifically, Microsoft CRM 1.2 and Microsoft Dynamics 3.0 have the following duration fields for activities:
 * ScheduledDurationMinutes
 * ActualDurationMinutes

In Microsoft CRM 3.0, you can edit only the Duration field on the default Appointments form.

In Microsoft CRM 1.2, the value of the Duration field is copied to the Actual Duration field when the appointment is closed. However, in Microsoft Dynamics CRM 3.0, the value of the Duration field is not copied to the Actual Duration field when the appointment is closed. Instead, the Actual Duration field retains its default setting of 30 minutes.



WORKAROUND
To work around this issue, use one of the following methods, as appropriate for your situation.

Method 1
If you do not need an automated process to update the fields in a form, follow these steps:
 * 1) Click Settings, click Customization, and then click Customize Entities.
 * 2) Double-click Appointment.
 * 3) Click Forms and Views.
 * 4) Double-click Form.
 * 5) Click the Appointment tab, and then click Add Fields.
 * 6) In the Add Fields dialog box, click to select the check boxes for the following fields, and then click OK:
 * 7) * Actual Duration
 * 8) * Actual Start
 * 9) * Actual End
 * 10) Click Save and Close to close the Form: Appointment window.
 * 11) On the Actions menu, click Publish.
 * 12) After the customizations have been published, click Save and Close to close the Entity: Appointment window.
 * 13) Click Workplace, click My Work, and then click Activities.
 * 14) Click New.
 * 15) In the New Activity dialog box, click Appointment, and then click OK.

The new fields that you added in step 6 will now be available. However, there is no code that is associated with the fields. You must manually change the new fields when an update to the fields is needed.

Method 2
If you need an automated process to update the fields in a form, follow these steps:  Click Settings, click Customization, and then click Customize Entities. Double-click Appointment. Click Forms and Views. Double-click Form. Click the Appointment tab, and then click Add Fields. In the Add Fields dialog box, click to select the check boxes for the following fields, and then click OK: <ul> Actual Duration</li> Actual Start</li> Actual End</li></ul> </li> To add an automated process to update fields in the form, follow these steps: <ol style="list-style-type: lower-alpha;"> Click one of the fields that you added in step 6. For example, click Actual Duration.</li> Click Change Properties.</li> On the Display tab in the Field Properties dialog box, click to select the Disabled on the form check box, and then click OK.</li> Repeat steps a and b for the rest of the fields that you added in step 6.</li> Click Form Properties.</li> On the Events tab, click OnSave and then click Edit.</li>  Type the following code: crmForm.all.actualdurationminutes.DataValue = crmForm.all.scheduleddurationminutes.DataValue; crmForm.all.actualstart.DataValue = crmForm.all.scheduledstart.DataValue; crmForm.all.actualend.DataValue = crmForm.all.scheduledend.DataValue; </li> Click to select the Event is enabled check box, and then click OK.</li> Click OK.</li></ol> </li> Click Save and Close to close the Form: Appointment dialog box.</li> On the Actions menu, click Publish.</li> After the customizations have been published, click Save and Close to close the Entity: Appointment window.</li> <li>Click Workplace, click My Work, and then click Activities.</li> <li>Click New.</li> <li>In the New Activity dialog box, click Appointment, and then click OK.</li></ol>

The new fields that you added in step 6 are now available and will be updated automatically.

<div class="moreinformation_section">

MORE INFORMATION
When you enter a time value for an activity such as an appointment in Microsoft Dynamics CRM 3.0, the saved time value for the activity may be incorrect. For more information about this problem, click the following article number to view the article in the Microsoft Knowledge Base:

915916 The duration value may be incorrect when you create an appointment activity record in Microsoft Dynamics CRM 3.0

Additional query words: crm3 crm30 crm3.0

Keywords: kbtshoot kbprb kbmbsmigrate kbpubtypekc KB913391

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.