RescheduleRequest Class

 

Applies To: Dynamics CRM 2015

Contains the data that is needed to reschedule an appointment, recurring appointment, or service appointment (service activity).

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 ref class RescheduleRequest sealed : OrganizationRequest
[<Sealed>]
[<DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")>]
type RescheduleRequest = 
    class
        inherit OrganizationRequest
    end
<DataContractAttribute(Namespace := "https://schemas.microsoft.com/crm/2011/Contracts")>
Public NotInheritable Class RescheduleRequest
    Inherits OrganizationRequest

Constructors

Name Description
System_CAPS_pubmethod RescheduleRequest()

Initializes a new instance of the RescheduleRequest class.

Properties

Name Description
System_CAPS_pubproperty ExtensionData

Gets or sets the structure that contains extra data. Optional.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty Item[String]

Gets or sets the indexer for the Parameters collection.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional. (Inherited from OrganizationRequest.)

System_CAPS_pubproperty RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty ReturnNotifications

For internal use only.

System_CAPS_pubproperty Target

Gets or sets the target of the reschedule operation.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod 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

© 2016 Microsoft. All rights reserved. Copyright