The purpose of this blog post is for those of you who are looking to understand Lookup fields in Dynamics 365 (or Dynamics CRM), or a quick refresher on how lookups work. We always recommend allowing a partner such as Columbus to help with your initial setup of the system, or at least a brief Administrator training session prior to diving right into these configurations (especially in a live environment!), but we do understand that whether it be budget or just confidence in technical abilities, many users want to take a stab at learning it on their own.
What are Lookup Fields?
Lookups are the most complicated fields to work with. This is because you are not just creating a lookup field on the form, but when a lookup field is created, it also creates a relationship (N:1 relationship) between the entity that the lookup is created for and the entity that is being looked up to. Because of this there are a couple things to be aware of.
Let’s say for example, on my Opportunity entity I want to track who referred this opportunity to our organization. I want to create a lookup from my Opportunity entity to the Account and call it Referring Account. From my Opportunity form, I can click create new, and put in the information for my new Parent Account field:
Now from the Opportunity side, it is very straight forward. We now simply a field called Referring Account and we can select the Account that is already in our system as the account that referred this Opportunity to us.
However from my Account form there has been an added relationship within the navigation pane as well that could cause some confusion. Because of the 1:N relationship (1 Account to N (many) Opportunities) it added a related “Opportunities” entity to the account. If you aren’t familiar with relationships, see this article
Well that’s less than ideal, I know have to relationships called the exact same thing. So why did this happen? The short answer is, there are now 2 1:N relationships from the Account the Opportunity entity. This isn’t a bad thing, but we do need a way to differentiate the 2. The “Opportunities” listed under sales was already existing, and this relationship shows all Sales Opportunities for the account I am on, so this one is appropriately named. However the other related “Opportunities” is from our newly created lookup field, and will show all opportunities that this account has referred for us. So it makes sense to rename this something like “Opportunity Referrals” which can be done within the Account form by selecting the relationship we want to rename.
After changing the Label field and saving and publishing, these changes will have been pushed out to the live system. As a side note, once a 1:N relationship is created, we have the ability to add a sub-grid as well.
Now that we’ve gone through that, it would certainly be understandable if you came away with more questions than answers. This is definitely among the more advanced configurations you can make to your system. If you are stuck please, do not hesitate to reach out to us for additional assistance!
About Ryan Talsma: