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 :
Customer experience | Sales, Customer Insights,...
Answered

Creating N:1 relationship on custom entity to account entity , not adding the 1:N relationship in solution

(0) ShareShare
ReportReport
Posted on by 690

Hi all,

I have the following scenario.

1. Created a solution 

2. Created a custom Entity (Lets call it CustomEntity1).

3. Added the existing account entity, created some fields and one calculated field.

4. Added a N:1 relationship from Custom Entity to account Entity. The relationship got added and the lookup field was added on custom entity.

5. When i go to Account entity Under 1:N relationship , i do not see anything

6. Try to use "Add subcomponents", in the dialog see a relationship with name starting with my solution prefix. Try to add the same, also accept the "Yes, include the required components". but it does not add naything.

7. In my account default form the CustomEntity data is shown as a subgrid.

The problem is that now if i use the account form and try to see the data it comes blank, but if i used Advanced view and then in the advanced view clcik the lookupfield, there the data in subgrid id comming.

What am i doing wrong here ?

- Shankar

I have the same question (0)
  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    Hi Shankar,

    For point 6, The 1:N and N:1 are tied together in a solution. So if you added N:1 of custom Entity then it should add 1:N on account automatically. Sometimes though I have faced a similar issue but removing the entity and adding it again solves the issue for me.

    Coming to the subgrid question, is the account lookup populated on the customentity form when you search in the advanced find?

    Because if the account lookup is populated then the record should show up in the associated view.

    Also please check if there isn't a duplicate relationship with the account - so you will end up seeing two customentities entries in the related record.

  • Girija Shankar Beuria Profile Picture
    690 on at

    Hi Prateek,

    Thanks for the reply

    I think i have tried everything. Also tried with a new Entity. Let me walk through you.

    1. Created an entity "Test"

    2. Added a relationship N:1 with Account as shown below.

    pastedimage1609748810297v2.png

    3. When i go to Account in 1:N I do not see anything there

    pastedimage1609748976373v3.png

    4. If i click on the Add Subcomponents i find the relationship

    pastedimage1609749069293v4.png

    5. I select that and click finish

    6. On the "Missing Required Components, i choose option "Yes,......"

    pastedimage1609749161420v5.png

    7. Still nothing shows up. If i select all the subcomponents also all gets added except this one and couple of others.

    Comming to the subgrid issue, yes the lookup field is populated in the Child table. The lookup is set by code on the field in child table to an account reference. The problem is that of i use the Account navigation approach ( Accounts --> The subgrid) it does not show any data. But of i use the child for navigation (Child form --> Click on account lookup field --> Account form --> Subgrid) the data shows up.

    Not sure if this is bug or issue or am i missing anything. This is simple Master child relation, not sure what i am missing.

    - Girija

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi Shankar,

    If you did not select Add All Assets when you add Account entity to the solution, then the new relationships that Account is the primary entity do not appear in the 1:N relationships of Account in the solution. So you have to select Add All Assets.

    pastedimage1609748587393v1.png

    Here is my test.

    TEST 1

    I create a new solution and Add existing > Entity, select Account, unckeck Add All Assets.

    pastedimage1609748638505v2.png

    Then I new a custom entity in the solution, create a 1:N relationship from Account to custom entity in Account entity.

    pastedimage1609748993857v6.png    pastedimage1609748919605v4.png

    The relationship does not appear in the 1:N relationship of Account.

    pastedimage1609748979684v5.png

    Then I create a N:1 relationship from Account to custom entity.

    pastedimage1609749036868v7.png    pastedimage1609749062444v8.png

    The relationship appears in the N:1 relationship of Account.

    pastedimage1609749096921v9.png

    The conclusion is that if Add All Assets is not selected when add Account to the solution, the 1:N relationships do not appear in the Account, the new created N:1 relationships appears in the solution.

    TEST 2

    I create a new solution and Add existing > Entity, select Account, ckeck Add All Assets.

    pastedimage1609750980015v10.png

    Then I new a custom entity in the solution, create a 1:N relationship from Account to custom entity in Account entity.

    pastedimage1609751244114v12.png

    The relationship appears in the 1:N relationship of Account.

    pastedimage1609751265287v13.png

    The conclusion is that if Add All Assets is selected when add Account to the solution, the new created N:1 relationships appears in the solution.

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi Shankar,

    About the sub-grid, can you check if the default view of the sub-grid has the correct filter?

    pastedimage1609751695481v1.png

    pastedimage1609751708120v2.png

    pastedimage1609751720615v3.png

  • Girija Shankar Beuria Profile Picture
    690 on at

    Yes, this issue was i didnot select all assets. Just FYI, for others who face this problem as well.

    - Girija

  • COOL Profile Picture
    40 on at

    Hi Gitija, will it pose any issue during deployment if the 1:N not appears in the solution? or any other issues?

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans