Here is the simple to clear cache and hard reload the browser and you see the changes immediately.
Open Dynamics 365 on Chrome Browser and open Developer Tools (Ctrl+Shift+I)
Put the mouse on Refresh Icon and right click. You will three options as shown below and select “Empty Cache and Hard Reload”
This option will clear the cache and reload the page.
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 LookupAttributeMetadata()
SchemaName = "new_myfirstpolymorphiclookup",
DisplayName = new Label("My First Polymorphic Lookup", 1033)
// Relationship 1
var oneToManyRelation1 = new OneToManyRelationshipMetadata();
oneToManyRelation1.ReferencingEntity = "new_vehicle";
oneToManyRelation1.ReferencedEntity = "new_motorcycle";
oneToManyRelation1.SchemaName = "new_vehicle_new_new_motorcycle";
// Relationship 2
var oneToManyRelation2 = new OneToManyRelationshipMetadata();
oneToManyRelation2.ReferencingEntity = "new_vehicle";
oneToManyRelation2.ReferencedEntity = "new_truck";
oneToManyRelation2.SchemaName = "new_vehicle_new_new_truck";
// Relationship 3
var oneToManyRelation3 = new OneToManyRelationshipMetadata();
oneToManyRelation3.ReferencingEntity = "new_vehicle";
oneToManyRelation3.ReferencedEntity = "new_car";
oneToManyRelation3.SchemaName = "new_vehicle_new_new_car";
orgRequest.Parameters["OneToManyRelationships"] = new OneToManyRelationshipMetadata
oneToManyRelation1, oneToManyRelation2, oneToManyRelation3
// specify the existing solution name
orgRequest.Parameters["SolutionUniqueName"] = "MySolution";
var response = crmServiceClient.Execute(orgRequest);