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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting Contact ID from Activity ID

(0) ShareShare
ReportReport
Posted on by

Dear Friends

Please guide me how to Get the Contact ID from Activity ID. For example I have PhoneCall Entity (PhoneCall Activity). From ActivityID, I want to fetch the Contact ID. On Form it is TO field but in Entity it Regarding Id.

So kindly help to get the Contact ID from PhoneCall Activity ID

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Anil,

    Ideally the contact is set in the regarding field so you need to fetch the regarding field to get the contact id however the contact can be added as from, to cc , bcc etc fields so it actually depends upon your requirement what value you want to retrieve.

    Further more it also depends upon how you want to get the contact id i.e. javascript, c# code or in a workflow or something else. These things depends upon what you want to do with that contact id.

    So in short, in order to help you out to get the contact id, you need to help us out in understandingyour exact requirement.

    Hope this helps.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You can fetch Contact id from To as well as from Regarding.

    "To" is activity party type field and it holds "User,Queue, Account and Contact".

    Regarding is Multi entity lookup.  Regarding may hold Account, contact, Opportunity or any custom entity.

    You will get more details at below link;

    crmbusiness.wordpress.com/.../crm-2016-activityparty-and-activityparty-lists

  • Community Member Profile Picture
    on at

    Dear Friends

    Would you guide me how to do these from JAVASCRIPT. I will be very thankful to guys.

    Thanks

  • Community Member Profile Picture
    on at

    Hi Ravi

    I want to Fetch the Contact Id from PhoneCall ActivityId using JavaScript (Web API V9). Would you guide me how I will do it.

    I will very thankful to you for helping me out of these.

    Thanks

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Anil,

    You need to share full details of you requirement. As mentioned above, the contact can be added to To, CC, etc field as well. Which field you want to retieve. Also, from where you wil get the activity id and where do you want to run the js code.

    Never the less, you can use CRM Rest builder tool to generate the javascript code and fetchj the details you wish to retrieve. Refer the below blog. You can then post your specifc question in a new thread if you face any difficulties or issues.

    carldesouza.com/dynamics-crm-rest-builder

    You can download the tool here- github.com/.../releases

    Hope this helps.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans