Quick View Form and sub grid Issue in Dynamics 365


Intro :

I encountered a problem while working with quick view forms having sub grids.

The quick view form is meant to display the account details upon selecting an account on lookup in custom entity form.


Quick view form has sub grid displaying related record to account such as cases and opportunities , the problem occurs whenever you change the select account , all the details are updated to reflect the new selected account except the sub grids .

 They keep displaying the related records to the old one.

Fix :

  1. Add on change event handler on the account lookup
  2. Include the following piece of code in your java script function

var quickViewControl = Xrm.Page.ui.quickForms.get("your quick view form name");
if (quickViewControl != undefined) {
if (quickViewControl.isLoaded()) {

How to solve : A proxy type with the name account has been defined by another assembly

The problem is actually with WCF attempting to deserialize the server response and not being able to identify the correct type. The best method to sort this issue is to pass in the current assembly using Assembly.GetExecutingAssembly() to the ProxyTypesBehavior() while creating the proxy like so

using (serviceProxy = new OrganizationServiceProxy(config.OrganizationUri,
// This statement is required to enable early-bound type support.
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior(Assembly.GetExecutingAssembly()));

Perform left outer join using Fetch XML in MS CRM

This illustration shows you how to use FetchXML queries to perform left outer join.

The following query shows how to query accounts having no leads

<fetch mapping='logical'>
<entity name='account'>
<attribute name='name'/>
<link-entity name='lead' from='leadid' to='originatingleadid' link-type='outer'/>
<filter operator='and'>
<condition entityname='lead' attribute='leadid' operator='null'/>