web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Web Api: Add requiered people to an appointment

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    Yes, you need to create activity parties.

    Please refer the following:

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

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    Community Member Profile Picture
    on at

    Refer this as well:

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

  • Verified answer
    Community Member Profile Picture
    on at

    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
    Vipin J Profile Picture
    1,603 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans