Force SDK-to-create appointment programmatically in CRM Onpremise

Source: Internet
Author: User
Tags building windows

As I know based on this:

Msdn.microsoft.com/.../gg334289.aspx

and

Community.dynamics.com/.../book-an-appointment-in-microsoft-dynamics-crm-2011-using-c-or-jscript.aspx

This request was to validate and book appointment if valid.

_appointmentid = Booked. Validationresult.activityid;

Verify the appointment has been scheduled.

if (_appointmentid! = guid.empty)

I would suggest you to create your own pops up.

The logic is

You add one + Else after

if (_appointmentid! = guid.empty)

It does mean the user is not available, and since you be building Windows app, create your own window, and you can force It by skipping this validation, instead, using your own pops up, and if the user says yes, you just create appointment usin G Common create request.

So, if the bookrquest are properly used for validation and booking purpose, see this as well:

Description = "Test appointment created using the Bookrequest Message.",

Then to force, you just create a appointment using standard Create message:

Msdn.microsoft.com/.../gg334604.aspx

Or

public void Createrequiredrecords ()

{

Create a Contact

Contact NewContact = new Contact

{

FirstName = "Lisa",

LastName = "Andrews",

EMailAddress1 = "[Email protected]"

};

_contactid = _serviceproxy.create (newcontact);

Console.WriteLine ("Created Contact: {0}.", Newcontact.firstname + "" + newcontact.lastname);

Create AB Activity Party

ActivityParty Requiredattendee = new ActivityParty

{

PartyId = new EntityReference (Contact.entitylogicalname, _contactid)

};

Create an appointment

Appointment Newappointment = new Appointment

{

Subject = "Test Appointment",

Description = "Test Appointment",

ScheduledStart = DateTime.Now.AddHours (1),

ScheduledEnd = DateTime.Now.AddHours (2),

Location = "Office",

Requiredattendees = new activityparty[] {Requiredattendee}

};

_appointmentid = _serviceproxy.create (newappointment);

Console.WriteLine ("Created {0}.", Newappointment.subject);

}

Thank.

source:http://community.dynamics.com/crm/f/117/t/146823

Force SDK-to-create appointment programmatically in CRM Onpremise

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.