Dynamics 365: Lookup controls – which view is the “lookup view”?

By | October 26, 2017

I used to think that lookup controls are using entity “lookup view”, but, it seems, I was wrong. It might be something that has changed along the way, or it might always work differently.. this way or another, it came out as a bit of a surprise earlier today when I was looking at V9.

Basically, when setting up a lookup control, there is an option to choose the default view.

image

It seems that’s exactly the view which Dynamics will be using as a lookup view.

Yes, it is definitely the view that shows up when I click “Look Up More Records” – that I knew:

image

 

image

What I did not quite realize, though, is that it’s the view which Dynamics is using as a lookup view when we start typing in the lookup control, for example:

image

Just have a look at the columns in my “accounts lookup view” and you’ll see that it’s not that view at all – there are no emails on the screenshot above, but it’s the second column in the lookup view:

image

 

Actually, it seems to be a bit more complicated than just searching in the default view. The way I understand it, here is what Dynamics will do once you have typed in a search string in the lookup control and clicked the search button:

  • It will apply default view filtering conditions first
  • It will extend those conditions with the “OR” filter on all the attributes added to the “find columns” of the lookup entity’s quick find view
  • It will use default view column layout to display the results (3 first columns of the view will be displayed)

 

And it seems to be somewhat consistent with the description here:

https://www.microsoft.com/en-US/dynamics/crm-customer-center/how-inline-lookup-works.aspx

Although, I’m not sure what it means when it’s been put this way:

“Lookup search results show the first three columns that are defined in the lookup view of the entity or the view that’s set as the default view of that lookup”

Based on the screenshots above, it seems that Dynamics will be using “default view” only.

4 thoughts on “Dynamics 365: Lookup controls – which view is the “lookup view”?

  1. Carolina

    Hi, it always shows the “Name” field as the first column, and after that the column 1 and 2 of the view that you set as LookUp View, very tricky

    Reply
  2. Jamie Ells

    IIUC;
    the lookup view is used as a default view for lookup filtering when the lookup control is first added to the form, but is also capable of referencing other views (wherein the primary field and first two other columns will be displayed).

    Hence; “Lookup search results show the first three columns that are defined in the lookup view of the entity or the view that’s set as the default view of that lookup”.

    I agree, the wording is not clear.

    Thanks for some excellent blog posts !

    Reply
  3. Saloni

    hi,
    i want to change dynamic label in edit filter criteria of view. I select Account entity with equal condition , but after that i want to pass dynamic value or account name. can you tell me how i can customize it through coding or any other method?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *