How to add multiple tables to a single lookup Field in Microsoft Dynamics 365?

Lookups are a special field where you will be able to get a record of another table. It creates a child to parent relationship with that table, using this we can get access to that record and its fields, and with this access we can build automations on multiple tables. Now Multiple table lookup is also a lookup field, but here instead of getting records from one table you can get the records from the selected multiple tables.

 

Why multiple table lookups are needed?
Generally we use a normal lookup that fetches data from one table, but what if you want to fill your field with data from multiple tables? – at this condition you can create a multiple table lookup field, where you will be able to get records from different tables.

How to create multiple table lookup field?

Open Xrm Tool Box – connect to your environment by providing necessary details. After the connection select POLYMORPHIC LOOKUP MANAGER.

multiple tables

Open the tool , you will see a window like this below.
multiple tables

  1. Select your solution in which you are working on
  2. Select the Referencing table in which your multi-table lookup has to be kept.
  3. Select the Attribute as <Create new polymorphic lookup>.
  4. Write the Lookup Display name of the multi-table lookup.
  5. Now select Referenced Tables. (tables from which you want records on your lookup).

Now click on Create Polymorphic Lookup.
Your Multi-table lookup is created, now add this field to your form of the entity.
Once you add it to your form and see in the front end, you should be able to see like this below.
multiple tables

You can also edit the tables from which you want records.

  1. Open Xrm Tool Box
  2. Select the same again
  3. Select and deselect the tables and click on Apply changes.

Leave a Reply