Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Parent/Child Company Relational Views on Opportunities

  • 1.  Parent/Child Company Relational Views on Opportunities

    GOLD CONTRIBUTOR
    Posted Jul 29, 2019 01:30 PM
    Hello All,

    Just wanted to see if this is something others have encountered as an actual issue or if this is just something that can't be done normally or OOB. I am attempting to create a View, that will display within a Sub-Grid on a Company (account) Form. I want it to display the Child Company (account) Opportunities to the relative Parent Company (account). However, there is no such selection for "Child Company of Parent Company". From what I've researched online, there doesn't seem to be much on how to go about accomplishing this. I did find a few articles, but it is highly inadvisable to 'filter the sub-grid' as it states within the below article link.
    Microsoft Dynamics CRM Forum
    Dynamics remove preview
    Microsoft Dynamics CRM Forum
    View this on Dynamics >

    The thing I don't get is that hierarchical data sets should be bidrectional shouldn't they? If I am able to 'drill down' into data, then it's logical to think I should be able to 'drill up' as well, correct?

    Just looking for any advice on how to go about doing this if someone's found a workaround that doesn't involve the above article's 'not-recommended' steps of filtering the sub-grid. I do understand that I could produce a chart with the results of the data, but we wouldn't be able to quick select and view the actual record associated with the Child Company from a chart. Any help would be appreciated.

    Thank you,

    ------------------------------
    Nicholas Arbour
    TEKLYNX
    Whitefish Bay WI
    ------------------------------
    Conference-CRMUG_200x200


  • 2.  RE: Parent/Child Company Relational Views on Opportunities

    SILVER CONTRIBUTOR
    Posted Jul 30, 2019 09:25 AM
    Hi Nicholas,

    My first thought would be to add a field 'Parent Account' in opportunity that would be populated automatically with a workflow when opportunity's account is set or changed.
    It is not ideal as it would somehow duplicate the data.

    The other way I am seeing would be to add code to change the fetchXml associated to the view, by using https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/addcustomfilter

    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------

    Conference-CRMUG_200x200


  • 3.  RE: Parent/Child Company Relational Views on Opportunities

    GOLD CONTRIBUTOR
    Posted Aug 02, 2019 11:25 AM
    Hello Fabien,

    Thanks for the reply, I'll take a look into this. Might be able to accomplish this with the method presented within the link.

    Thank you,

    ------------------------------
    Nicholas Arbour
    TEKLYNX
    Whitefish Bay WI
    ------------------------------

    Conference-CRMUG_200x200


  • 4.  RE: Parent/Child Company Relational Views on Opportunities

    SILVER CONTRIBUTOR
    Posted Aug 02, 2019 12:05 PM
    Hello Nicholas,

    I wanted to share code I wrote using this method and that refreshed my mind that this method applies to a lookup field but not a subgrid :(
    Sorry for the misguidance. I don't see any supported way to use second method here with JScript.

    Some found out unsupported ways, so use at your own risks ;)
    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/216881/how-to-set-up-custom-fetchxml-for-subgrid-in-dynamics-crm

    ------------------------------
    Fabien Bernard
    CRM Developer
    Montréal QC
    ------------------------------

    Conference-CRMUG_200x200


  • 5.  RE: Parent/Child Company Relational Views on Opportunities

    GOLD CONTRIBUTOR
    Posted Aug 02, 2019 03:25 PM
    We are indeed doing this with an additional field on Opportunity. If Parent Account on the Account is filled - then a workflow fills in the Parent Account on Opportunity. Then on Account I have a separate subgrid showing Opportunities using the Parent Account (Opportunity) relation.

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------

    Conference-CRMUG_200x200


  • 6.  RE: Parent/Child Company Relational Views on Opportunities

    GOLD CONTRIBUTOR
    Posted Aug 22, 2019 12:00 PM
    Hello Sissy,

    Thank you for that update, much appreciated. Essentially that is the route I ended up taking in the long run. Using the relationship to the Parent Company (we renamed Accounts) on both the Company/Opportunity Forms to pull in the information related to Child Company records. Thank you for the help.

    ------------------------------
    Nicholas Arbour
    TEKLYNX
    Whitefish Bay WI
    ------------------------------

    Conference-CRMUG_200x200


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