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)

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

    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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans