web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    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).

  • Larry McCoy Profile Picture
    on at

    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
    Mamatha Swamy Profile Picture
    5,426 on at

    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!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans