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 :
Customer experience | Sales, Customer Insights,...
Unanswered

How to obtain fullname of the participients from activityparties ?

(0) ShareShare
ReportReport
Posted on by

Hello, I have I problem with obtaining fullname of participients of appointment.
I have my own function to send request in C# which based on HttpClient()).

To take my activities list I send request like:

[organisation]/api/data/v9.0/activitypointers $filter=activitytypecode eq 'Appointment' or activitytypecode eq 'Task' .... (I'm taking info about Appointments, Tasks, Phone calls and Emails).

Next I want to take only participients of appointments. So in C# I'm using foreach loop on json response like:

foreach (var singleItem in jsonResponse)
{...}

and inside I'm checking activitytypecode like:

if(singleItem.SelectToken("activitytypecode").ToString() == "Appointment"){

DO SOMETHING

}

If IF function return true I'm sending activity id to /activityparties like:

[organisation]/api/data/v9.0/activityparties?$filter=_activityid_value eq MY_ACTIVITY_ID

in response, I receive a list of participients but only with ID's (and others info but no with fullname etc.)

I could send every participient ID's to /contacts but not every participients are contact, it can be for example lead. There are no info about type of participient (contact,lead) in participients list so I don't know where to send participeint ID's. 

Is there any easier way to retrieve the FULLNAME (or name + secondname) of appointment participants with a specific appointment id ?

I have the same question (0)
  • Esteban Coto Alfaro Profile Picture
    on at

    Hello, I found this site in which an example is presented that could be of help: promx.net/.../

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

  • Community Member Profile Picture
    on at

    Yeah, I found it too and it's works. So if anyone want to take formatted values from Dynamics by C# HttpClient() you just need to add header like below:

    using (HttpClient client = new HttpClient())

           {

               client.BaseAddress = new Uri("[YOUR_ORGANIZATION]dynamics.com");

               client.DefaultRequestHeaders.Add("Authorization", "Bearer " + sessionToken);

               client.DefaultRequestHeaders.Add("Accept", "application/json");

               client.DefaultRequestHeaders.Add("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");

           }

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans