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)

How to add an entity as a relationship to another entity in a plugin?

(0) ShareShare
ReportReport
Posted on by 190

Entity A has a 1:N relationship to Entity B

1. I am trying to add Entity B (already created) to Entity A (already created) within a plugin. How do I associate them? I am retrieving Entity A and B through Retrieve/RetrieveMultiple.

2. By default, when you create Entity B, will it automatically be associated to Entity A or do I have to manually associate them myself? If manual, how might I do that?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pramod M Profile Picture
    1,445 on at

    I think you are asking about associating records of entity B and Entity A. After creating the relationship you can add a lookup of entity A in the form of Entity B. Also Entity B will appear in the left navbar of entity A. Now you can add multiple entity B from the record of entity A and in this case the relation will be automatically created (by default the record A will be available as selected in lookup inside record B's form). Also when you create record of Entity B you can select the record of entity A from the lookup which is added in the form (make this business required so that user will be forced to select the record of entity A). In this case also the relationship happens automatically.

    Hope this helps.

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