Reschedule Message

Reschedules an appointment.



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

// 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://:/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);