We all know that a lookup pointing to multiple tables was an ask from many customers. Although we have a Partylist field available on Email entity, we don’t have any control to create the same as a Custom Field.
Our voice has been heard by Microsoft and released Multi-Table Lookup in Dynamics 365. For now, creation of this lookup is allowed via C# code or Web API.
Here is the code and explanation for the same.
I have four entities named as Vehicle, Motorcycle, Trucks and Cars.
We need a lookup on Vehicle entity which hold information about all other three entities.
I did run the below code and it created a lookup on Vehicle entity where I can select the record from any of the three entities (Motorcycle, Trucks or Cars).
OrganizationRequest orgRequest = new OrganizationRequest(); orgRequest.RequestName = "CreatePolymorphicLookupAttribute"; // specify lookup attribute details orgRequest.Parameters["Lookup"] = new…
View original post 94 more words