Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Help modifying XML to pull regarding that are set regarding one of several entities

  • 1.  Help modifying XML to pull regarding that are set regarding one of several entities

    D365UG/CRMUG ALL STAR
    Posted 21 days ago
    We woudl like to pull an activity that is regarding a company, or a contact under that company or a proposal related to that company or a project reglated to that company etc...

    We created this advanced find and of course it does nto work because you cant set the related recrods to or statements.


    Is it possible to export the XML and change these to or statement and use that to create a view?

    thanks for your help!

    Laura

    ------------------------------
    Laura Mortick
    Marketing Information Systems Manager
    Terracon
    Olathe KS
    Kansas City CRMUG Chapter Leader
    ------------------------------


  • 2.  RE: Help modifying XML to pull regarding that are set regarding one of several entities

    TOP CONTRIBUTOR
    Posted 21 days ago
    Yes, if you export the FetchXML for that Advanced Find and open it in FetchXML Builder you can edit this query as you need.

    When you open this query you'll see three link-entities. If you click on each of these you'll see that their "Link type" is set to either blank or "inner". First, change each of these to "outer" - this will make your results include all activities, plus the details of the linked regarding records of each type where possible.

    Next, select the top "entity activitypointer" part of the query, and add a filter. FetchXML Builder will automatically add a "condition" to the filter, but first click back to the main filter item and change its "Filter type" to "or".

    Now select the "condition" item. Under "Entity" select the first of the link entities (they're given auto-generated names by Advanced Find, "aa", "ab" and "ad" in my case). For the "Attribute" setting, select the primary key attribute of that entity type (e.g. "contactid"), and for the "Operator" setting select "NotNull"

    Once you've finished the query should look like:


    (Your link-entities will be different, I've used quote/order/invoice here)

    The filters now make sure that only activities that are regarding one of these matching related records are included in the results.

    ------------------------------
    Mark Carrington
    Chief Technologist
    Data8
    Chester
    ------------------------------



  • 3.  RE: Help modifying XML to pull regarding that are set regarding one of several entities

    D365UG/CRMUG ALL STAR
    Posted 21 days ago
    Oh my goodness @Mark Carrington - thank you SO much!  I will pass this along to my developer.  You put a lot of time into that, i am so appreciative!  Love this community!​

    ------------------------------
    Laura Mortick
    Marketing Information Systems Manager
    Terracon
    Olathe KS
    Kansas City CRMUG Chapter Leader
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role