web
You’re offline. This is a read only version of the page.
close
Skip to main content
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.

I have the same question (0)
  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: How to query activities by it's regarding object ODATA/Fetch?

    Hi, 

    please refer to this example: 

      
        
        
      
    

  • Suggested answer
    Torrado Profile Picture
    1,270 on at
    RE: How to query activities by it's regarding object ODATA/Fetch?

    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
    RE: How to query activities by it's regarding object ODATA/Fetch?

    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
    RE: How to query activities by it's regarding object ODATA/Fetch?

    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

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 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans