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 365 | Integration, Dataverse...
Answered

How to query activities by it's regarding object ODATA/Fetch?

(0) ShareShare
ReportReport
Posted on by 60

How could I make a query for activities but filtering by regarding object. I mean there are activities regarding to lead, opportunitites, with odata or fetchXml

if I'd like to filter those regarthing to leads.

I've tried something like activitypointers?$select=activityid&$filter=_regardingobjectid_value@Microsoft.Dynamics.CRM.lookuplogicalname eq 'lead' but no works.  Any help. thanks.

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    please refer to this example: 

      
        
        
      
    

  • Suggested answer
    Torrado Profile Picture
    1,270 on at

    Hello,

    for that kind of requirement, where you need to build a fetchxml or odata query, you can make use of two useful tools:

    Hope this helps you.

    Please mark the answer as verified if helpful. That will help others in future.

  • TerryShowman Profile Picture
    60 on at

    Hi ty,  if I'd like to hake two entities could i use this?

    for Opportunities and leads? or I must separate them?

     
       
       
       
     
    

    Thanks.

  • Suggested answer
    Torrado Profile Picture
    1,270 on at

    Hello Terry,

    With one of the tools that I suggested above you can create / test your fetchxml queries.

    FetchXMLBuilder is a XRMToolbox plugin, you can easily connect to your environment and use it to check that kind of scenarios.

    Hope this helps you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 65 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 38 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 24 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans