This documentation is archived and is not being maintained.

Reschedule Message (CrmService)

Dynamics
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment typesWorks online only

Reschedules an appointment.

The relevant classes are specified in the following table.

TypeClass
RequestRescheduleRequest
ResponseRescheduleResponse
TargetTargetSchedule
EntitySee below.

The following table shows the entities and target classes for this message.

EntityTarget Class
appointmentTargetScheduleAppointment
serviceappointmentTargetScheduleServiceAppointment
DynamicEntityTargetScheduleDynamic

Remarks

To use this message, pass an instance of the RescheduleRequest class as the request parameter in the Execute method.

To perform this action, the caller must have access rights on the entity instance specified in the request class. For a list of required privileges, see Reschedule Privileges.

Example

The following code example shows how to use the Reschedule message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the target.
TargetScheduleAppointment target = new TargetScheduleAppointment();
target.Appointment = retrieved;

// Create the request object.
RescheduleRequest reschedule = new RescheduleRequest();

// Set the properties of the request object.
reschedule.Target = target;

// Execute the request.
RescheduleResponse rescheduled = (RescheduleResponse)service.Execute(reschedule);

[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the target.
Dim target As New TargetScheduleAppointment()
target.Appointment = retrieved

' Create the request object.
Dim reschedule As New RescheduleRequest()

' Set the properties of the request object.
reschedule.Target = target

' Execute the request.
Dim rescheduled As RescheduleResponse = CType(service.Execute(reschedule), RescheduleResponse)

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show: