Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Managing grandchild relationships

(0) ShareShare
ReportReport
Posted on by

I have an issue in getting a Rollup field to calculate correctly, and I believe it is related to an improperly configured relationship between my entities.  Basically I have an Account entity, with a custom child entity, called Dues, which I use to manage membership dues that the account is paying.  It has information such as annual dues amount and their payment style (annual, monthly, etc.).  Each Dues entity has multiple child entities called Payment that track each individual payment.  There is a 1:N relationship between Account and Dues and a 1:N relationship between Dues and Payment.  So Payment is a "grandchild" of Account.  

I need to be able to directly link the Account and all related Payment records, in order to calculate a rollup field on the Account that is based on Payment entities.  Therefore, I made two additional configurations in my system

  1. I added a lookup field on Payment that is tied to the Account.
  2. I updated the Mapping on the relationship between Dues and Payments, so that the Account lookup field on Dues is linked to this new Account lookup on Payment.

THe idea is that when I create a new Dues from the Account entity, the Account lookup field is set.  Then when I create a new Payment from the Dues entity, the Account lookup field is should be set to match the "grandparent" account record.  This seem to work fine.

However, when I go to the Account record, and then go to the "AccountPayments" navigation, to show a grid of all related Payments, the grid is blank.  Even though each Payment record has a proper Account lookup field that points to the Account, these Payments are not showing up in the grid.  

This lack of "relationship" appears to be the source of my actual problem.  When I write a lookup field on account that references the related Payments, it does not find any records.  After creating all related records and noting the lookup failure, I did the following:

1. Go to the AccountPayments grid, and manually add in a Payment record.

2. Recalculate the Lookup field, and it works.

3.  Now I just need for the payment record to to be automatically associated when I create the record.

What suggestions do you have for explaining why this "relationship" is not being set correctly.

*This post is locked for comments

  • Suggested answer
    Mamatha Swamy Profile Picture
    5,424 on at
    RE: Managing grandchild relationships

    Larry,

    In CRM 2015, the "Add Existing" button is hidden by default. You will need to enable it if required. Check my posts on this thread community.dynamics.com/.../378716

    If you are not able to see the Payment records in the Associated view and are certain that the Payment record has the Account lookup set properly then, I would check the underlying relationship of that Account lookup. Sometimes there are multiple relationships between entities and as a result you would have multiple associated views. Make sure you are checking the right one.

    HTH!

  • Larry McCoy Profile Picture
    on at
    RE: Managing grandchild relationships

    Adam,

    Thanks for you reply and your input.  I may not have been clear on the exact problem I am having.  The mapping that I set up for the relationship is correctly setting the lookup for Account on the grandchild Payment entity.  I have the value of this lookup field displayed in the footer of my Payment entity, so I can see that it is set properly when the Payment record is created.

    However, when I look in the Account entity, and view a grid containing related Payment records (using the CRM navigation/command bar for this entity) the grid is blank and does not contain the Payment record(s).  I tried to correct this by associating the existing Payment with the Account, but there is no "Add Existing" record button. If I attempt to add a Payment record, it creates a new record.

    So ultimately, it appears to be a bug in CRM or I just don't understand how the "associated records" grid on the Account entity's navigation bar is supposed to work.

    Any further thought?

    Thanks!

    Larry

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Managing grandchild relationships

    Mapping only works at the point that a record is created. So as you have seen, a new Payment record created from Dues will copy the Account lookup field. This should then show up in the rollup field on the Account.

    Existing Payment records won't have the lookup filled in already. You need to update them. Two simple approaches:

    1) Create a view of payments that includes the Account lookup column (blank at the moment) and the Account lookup from the parent "Dues" record. Export, copy the lookup values from one column to the other then reimport to update the records. (you will have issues with any rows that refer to Accounts that have duplicate records with the same name, even if they are inactive).

    2) write a simple workflow, available on-demand, to run against the Payment records, that copies the Account lookup from the parent Dues record. Run this against existing payment records (a page at a time being the limitation here, so it depends how many you have).

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,758 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans