Views:

Applies to Product – Microsoft Dataverse


What’s happening?
When setting the Scheduled Duration on a custom activity called "Site Attendance," the duration resets back to 0 minutes after selection.


Reason:
The behavior occurs because the "Scheduled Duration" attribute only updates on out-of-the-box forms. When this field is added to a custom form, custom logic needs to be implemented in the onload event handler to retain the user's selection.


Resolution:

  1. Modify the ScheduledDurationMinutes property to set the scheduled duration of the activity in minutes. The ScheduledDurationMinutes field has the following attributes:
    • LogicalName: scheduleddurationminutes
    • Type: Integer
    • IsValidForForm: True
    • IsValidFor: True
    • RequiredLevel: None
  2. Ensure that both the "Due Date" and "Start Date" fields are added to the form, as this may help in populating the Duration field correctly.
  3. Contact a developer to assist with adding the necessary JavaScript onload event to update the duration field properly. If needed, create a new request with the customization team for further assistance.