Skip to main content

Notifications

Announcements

No record found.

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.

  • Suggested answer
    Torrado Profile Picture
    Torrado 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.

  • TerryShowman Profile Picture
    TerryShowman 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
    Torrado 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.

  • Verified answer
    meelamri Profile Picture
    meelamri 13,206 User Group Leader on at
    RE: How to query activities by it's regarding object ODATA/Fetch?

    Hi, 

    please refer to this example: 

      
        
        
      
    

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,784 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans