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.
Open the tool , you will see a window like this below.
- Select your solution in which you are working on
- Select the Referencing table in which your multi-table lookup has to be kept.
- Select the Attribute as <Create new polymorphic lookup>.
- Write the Lookup Display name of the multi-table lookup.
- 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.
You can also edit the tables from which you want records.
- Open Xrm Tool Box
- Select the same again
- Select and deselect the tables and click on Apply changes.