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 CRM (Archived)

Using OR across different entities in Advanced Find?

(0) ShareShare
ReportReport
Posted on by 22

Is there anyway I can make this query(simplified edition) work in Advanced Find:

SELECT 
APO.activitytypecodename,APO.owneridname,APO.regardingobjectidname, PCA.actualstart,APP.scheduledstart
FROM dbo.ActivityPointer APO
LEFT JOIN dbo.PhoneCall PCA ON APO.activityid = PCA.activityid
LEFT JOIN dbo.Appointment APP ON APO.activityid = APP.activityid
WHERE (PCA.category = 'Category1' OR APP.Category = 'Category1')

I want to show all phonecalls and appointments having category='Category1' but I'm not able to set the OR-operator to work  different entities... 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Royal King Profile Picture
    27,686 on at
    RE: Using OR across different entities in Advanced Find?

    I dont think you can do this with Advanced find .One way to show all the records matching with sql query is building fetchxml based report and add that report to dashboard. You can easily convert this query into fetchxml. If you need any help in converting this sql query to fetchxml post your actual sql query i can generate fetchxml for the same.

  • Verified answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: Using OR across different entities in Advanced Find?

    Hi..

    You cannot do OR condition across different entities..

    Check for more details leontribe.blogspot.com/.../three-limitations-of-using-advanced-find.html

    Instead of using Advanced find.. you can create SSRS report either using FetchXML or SQL queries with filter parameter.. and load reporting into CRM..

    Using FetchXML also there are some limitations.. please check www.kingswaysoft.com/.../Limitations-with-CRM-FetchXML

    you can try converting your SQL queries into fetchXML by using http://www.sql2fetchxml.com/

    Here are some details on how to create report using SQL or FetchXML

    msdn.microsoft.com/.../gg328097.aspx

    www.njevity.com/.../creating-dynamics-crm-2011-reports-sql-reporting-services-pre-filtering-and-default-filters

    blogs.msdn.com/.../parameterizing-fetch-based-reports.aspx

    community.dynamics.com/.../microsoft-dynamics-crm-2011-fetch-xml-based-custom-reports.aspx

    Hope this will help..

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans