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)

Connect two entities by a field

(0) ShareShare
ReportReport
Posted on by

Hi,

It's my first time working on CRM dynamics,and i have two entities that have a common field(CabecId) and i want to get the details to display on a grid view.

I don't understand the workflow of crm yet.I could do it easily on c#, sql ,etc.

So how should i do it?This is crm dynamics 365.

Kind Regard

João Fernandes

PS: I have already the CabecId as field with value as a simple text. So can i still do the lookup way?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    You can create a relationship between these two entities EntA, EntB (1:N relationship).

    You can display EntB records in a subgrid in the form of EntA.

  • Suggested answer
    meenoo Profile Picture
    7,316 on at

    Hi H0nestly,

    Like Gopalan said, you can create 1:N relationship between entityA and entityB.

    Or else, simply go to entityA form, open 'Form Editor' and then navigate to 'Insert' tab and select Sub-Grid to insert on the form.

    Now, in the 'Set Properties' window, you will need to select entityB as the data source. Refer below screenshot:

    4721.Capture.PNG

    This way, the system will create the relationship between those two entities automatically.

    HTH. Thank you.

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    You can refer this:

    burnignorance.com/.../establish-relationship-between-two-entities-in-crm

  • Verified answer
    prt33k Profile Picture
    6,907 on at

    Hi,
    Consider entity in CRM as SQL tables. So what you need here is a foreign key reference in SQL terminology.
    So if you want a field CabecId on Entity A which refer to Entity B, then:
    go to Customization->Entities->Entity A-> N:1 relationship -> New Many to 1 Relationship
    Here you can add a new relationship which will allow you to refer to Entity B - You can keep the Display Name in Lookup section as Cubec.

    (Screenshot below - Select Related Entity as Entity B)

    Read more about Relationship here :https://msdn.microsoft.com/en-us/library/gg309412.aspx

    4452.16.PNG

  • Community Member Profile Picture
    on at

    Hi, but i want to make a custom relationship between idcabec field only . I dont want the system to do it for me.

  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    Hi,

    Custom relationship can be achieved by using a 3rd 'bridge' entity.

    So basically you create a new entity C which has two lookup - one for entity A and other for entity B.

    So Entity C will be N:1 with A and B thus making A and B having a N:N relationship.

    Thanks,

    PS

  • Community Member Profile Picture
    on at

    Hi, Can't be done in a easier way?

  • Suggested answer
    Jason M. Cosman Profile Picture
    5,234 Moderator on at

    Hey H0nestly;

    Everyone in the post so far is correct; make a lookup 1:N relationship unless you have a very specific business rule or process that won't allow for it. prt33k is correct in making a custom N:N relationship and that middle entity will allow you to describe the relationship more then just the 1 field if you need that. Overall this is to be used when there is business reason to go this route.

    Inside of Dynamics it's important to architect your solution properly. It's important to know that 1:N relationships are able to be utilized for dashboards and charts easily where N:N relationship aren't. There are other thoughts around what's the right approach to implementing relationships but again it's worth looking at the bigger picture of your implementation when doing this.

  • Community Member Profile Picture
    on at

    Okey, How can i populate the lockup field with the data in CabecId?

  • prt33k Profile Picture
    6,907 on at

    Lookup are reference to you entity. You can just click on it and select the record you want to refer.

    www.microsoft.com/.../how-inline-lookup-works.aspx

    I would prefer you go to start customization and see how the OOB CRM works to get better understanding.

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