I am new to MS CRM. I have below requirement: I have Entity A B and C in MS CRM 2016.

"Entity A" can have multiple "Entity B" records which are currently being displayed on "Entity A" form using 1 to N relationship. "Entity C" can have multiple "Entity A" records.I am able to display associated "Entity A" records on "Entity C" form using 1 to N relationship. On "Entity C" form, I want to display "Entity B" records associated with all of the "Entity A" which are associated with "Entity C". How can I achieve this?

2

There are 2 best solutions below

0
On BEST ANSWER

Create 1:N relationship between Entity C and Entity B and follow one of the below steps. Then create a subgrid on Entity C which list down the related Entity B records.

  1. Develop a plugin on Create & Update of Entity B to set the Entity C lookup (grand parent) based on the value selected in Entity A lookup (parent) in Entity B.

  2. Create a field mapping in Entity B:

    • Source Entity: Entity A
    • Source Field: Entity C lookup in Entity A
    • Target Entity: Entity B
    • Target Field: Entity C lookup in Entity B

C --1:N--> A --1:N--> B

C --1:N--> B

[Edited:] Below image shows what I explained above, and which is achieved using step #2.

enter image description here

0
On

I think you need to create a 1 to Many relationship between Entity C and B and a time of grid load you have to update the fecth xml of grid to filter the records to display only which are associated with entity A.