RescheduleRequest Class
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online
Contains the data that is needed to reschedule an appointment, recurring appointment, or service appointment (service activity).
For the Web API use the Reschedule Action.
Web API support for this message was added with Microsoft Dynamics CRM Online 2016 Update 1 and Microsoft Dynamics CRM 2016 Service Pack 1.
Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
Inheritance Hierarchy
System.Object
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Crm.Sdk.Messages.RescheduleRequest
Syntax
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class RescheduleRequest : OrganizationRequest
<DataContractAttribute(Namespace := "https://schemas.microsoft.com/crm/2011/Contracts")>
Public NotInheritable Class RescheduleRequest
Inherits OrganizationRequest
Constructors
Name | Description | |
---|---|---|
RescheduleRequest() | Initializes a new instance of the RescheduleRequest class. |
Properties
Name | Description | |
---|---|---|
ExtensionData | Gets or sets the structure that contains extra data. Optional.(Inherited from OrganizationRequest.) |
|
Item[String] | Gets or sets the indexer for the Parameters collection.(Inherited from OrganizationRequest.) |
|
Parameters | Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.) |
|
RequestId | Gets or sets the ID of an asynchronous operation (system job). Optional. (Inherited from OrganizationRequest.) |
|
RequestName | Gets or sets the name of the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.) |
|
ReturnNotifications | For internal use only. |
|
Target | Gets or sets the target of the reschedule operation. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Remarks
Message Availability
For this message to work, the caller must be connected to the server.
Usage
Pass an instance of this class to the Execute method, which returns an instance of the RescheduleResponse class.
Privileges and Access Rights
To perform this action, the caller must have privileges on the specified entity in the Target property and access rights on the specified record in the Target property. For a list of the required privileges, see Reschedule message privileges.
Supported Entities
The following table shows the default entities that support this message. For the listed entities, the caller must be connected to the server for this message to be available.
Entity |
---|
Appointment |
RecurringAppointmentMaster |
ServiceAppointment |
Examples
The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.
#region Reschedule an instance of recurring appointment
// Update the scheduled start and end dates of the appointment
// to reschedule it.
Appointment updateAppointment = new Appointment
{
ActivityId = individualAppointments.Entities.Select(x => (Appointment)x).First().ActivityId,
ScheduledStart = individualAppointments.Entities.Select(x => (Appointment)x).First().ScheduledStart.Value.AddHours(1),
ScheduledEnd = individualAppointments.Entities.Select(x => (Appointment)x).First().ScheduledEnd.Value.AddHours(2)
};
RescheduleRequest reschedule = new RescheduleRequest
{
Target = updateAppointment
};
RescheduleResponse rescheduled = (RescheduleResponse)_serviceProxy.Execute(reschedule);
Console.WriteLine("Rescheduled the second instance of the recurring appointment.");
#endregion Reschedule an instance of recurring appointment
' #Region "Reschedule an instance of recurring appointment"
' Update the scheduled start and end dates of the appointment
' to reschedule it.
Dim updateAppointment As Appointment = New Appointment With { _
.ActivityId = individualAppointments.Entities.Select(Function(x) CType(x, Appointment)).First().ActivityId, _
.ScheduledStart = individualAppointments.Entities.Select( _
Function(x) CType(x, Appointment)).First().ScheduledStart.Value.AddHours(1), _
.ScheduledEnd = individualAppointments.Entities.Select(Function(x) _
CType(x, Appointment)).First().ScheduledEnd.Value.AddHours(2)}
Dim reschedule As RescheduleRequest = New RescheduleRequest With {.Target = updateAppointment}
Dim rescheduled As RescheduleResponse = CType(_serviceProxy.Execute(reschedule), RescheduleResponse)
Console.WriteLine("Rescheduled the second instance of the recurring appointment.")
' #End Region ' Reschedule an instance of recurring appointment
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
RescheduleResponse
Microsoft.Crm.Sdk.Messages Namespace
Schedule and appointment entities
Sample: Reschedule and cancel a recurring appointment
Return to top
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright