Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Web Api: Add requiered people to an appointment

Posted on by Microsoft Employee

Hello,

Using the Web Api, I'm not able to add people to an appointment. I can create the appointment with a POST request to .../api/data/v8.2/appointments

{
  "scheduledstart":"2019-06-09T11:00:00Z",
  "scheduledend":"2019-06-09T15:00:00Z",
  "subject":"Appointment subject"
}


but no way to add "required people". I think I need to create something as an 'activityparties' but no success so far...

Has someone already did it ?

Thanks,

Danny

*This post is locked for comments

  • Suggested answer
    Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: Web Api: Add requiered people to an appointment

    Just adding - Queues cannot be a part of partylist.

    Here is list of various appointment operation using web api

    https://vjcity.blogspot.com/2020/06/appointment-in-dynamic-crm-using-web-api.html

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Web Api: Add requiered people to an appointment

    Thank you all. My final JSON POST Request to /api/data/v8.2/appointments  looks like:

    {
    	"scheduledstart": "2017-05-18T09:00:00Z",
    	"scheduledend": "2017-05-18T09:30:00Z",  
    	"subject": "subject title",  
    
    	"appointment_activity_parties": [
    		{      
    			"participationtypemask": 5,      
    			"partyid_contact@odata.bind": "/contacts(xxxxxxx)"    
    		},    
    		{      
    			"participationtypemask": 5,      
    			"partyid_systemuser@odata.bind": "/systemusers(xxxxx)"    
    		}  
    	]
    }


  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Web Api: Add requiered people to an appointment

    Refer this as well:

    neilparkhurst.com/.../javascript-set-activity-party

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Web Api: Add requiered people to an appointment

    Refer this code:

    msdn.microsoft.com/.../gg334289.aspx

    // Create the ActivityParty instance.

                       ActivityParty party = new ActivityParty

                       {

                           PartyId = new EntityReference(SystemUser.EntityLogicalName, userResponse.UserId)

                       };

                       // Create the appointment instance.

                       Appointment appointment = new Appointment

                       {

                           Subject = "Test Appointment",

                           Description = "Test Appointment created using the BookRequest Message.",

                           ScheduledStart = DateTime.Now.AddHours(1),

                           ScheduledEnd = DateTime.Now.AddHours(2),

                           Location = "Office",

                           RequiredAttendees = new ActivityParty[] { party },

                           Organizer = new ActivityParty[] { party }                        

                       };      

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Web Api: Add requiered people to an appointment

    Hi

    Yes, you need to create activity parties.

    Please refer the following:

    syednizamsyed.blogspot.co.uk/.../create-activity-and-associated-activity.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans