Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Search fields in lookup view don't seem to work

(0) ShareShare
ReportReport
Posted on by 12

Hey dear reader,
I'm having trouble with a nasty little issue. We're talking about a CRM 2016 8.1 on premise installation.

When I use "Look Up More Records" in a Lookup field, the Look Up Record popup appears. Works as designed/wanted, right? In my specific example, there are only four records to be found (excuse me for the Dutch, is base language):
        2019_2D00_03_2D00_27_5F00_08_2D00_34_2D00_35.jpg

Next, I'm trying to search using the Search box (Dutch: Zoeken):

        2019_2D00_03_2D00_27_5F00_08_2D00_38_2D00_43.jpg

Even though the search term "10" should sort out two records, none are selected. Also directly from the Lookup field (without opening the search popup), nothing ever is found.
In the Quick Find View, the "name" (naam) field is selected, saved and published.

Now, what am I overlooking? Why can't I find anything when searching?

Thanks for thinking along with me.
Regards,

Jeroen

*This post is locked for comments

  • Jeroen J Profile Picture
    12 on at
    RE: Search fields in lookup view don't seem to work

    Goodmorning (that is, over here),

    If I query in Advanced Find on a (or the) project I get exactly the results I need (that is the four from my original post).

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Search fields in lookup view don't seem to work

    One explanation to that could be cached query execution plan but it should not do that. What happens if you query project items in advance find with project id filter.

  • Jeroen J Profile Picture
    12 on at
    RE: Search fields in lookup view don't seem to work

    I created an entirely new entity, added project and item lookups (item is depending on project) to a new form. Surprise: same behaviour.

    I did a SQL Server profile and extracted the exact code (as below) that sorted out eeeeerm zero records. When I cut out the project = projectID, it shows (way too many) records.
    Yet when I do a direct query on db that matches the exact parameters from the profiler, I get exactly the amount of lines that I expected.

    exec sp_executesql N'WITH __QuickFind__ as (select top 10001 [psa_projectitemId] from (
    SELECT "psa_projectitem0".[Key] AS [psa_projectitemId] FROM ContainsTable([psa_projectitemBase], (psa_name), @psa_name0) AS "psa_projectitem0") as [__QuickFindInternal__])select 
    top 251 "psa_projectitem0".psa_name as "psa_name"
    , "psa_projectitem0".psa_ItemGroup as "psa_itemgroup"
    , "psa_projectitem0".psa_ItemType as "psa_itemtype"
    , "psa_projectitem0".psa_projectitemId as "psa_projectitemid"
    , convert(bigint, "psa_projectitem0".VersionNumber) as "versionnumber"
    , "psa_projectitem0".psa_ItemGroupName as "psa_itemgroupname"
    , case when (select COUNT(*) from [__QuickFind__]) = 10001 then 1 else 0 end as [__QuickFindLimitValue__] 
    from
     psa_projectitem as "psa_projectitem0" WITH (NOLOCK)  
    where
     [psa_projectitem0].[psa_projectitemId] in (select [psa_projectitemId] from [__QuickFind__]) and (("psa_projectitem0".psa_Project = @psa_Project0 and (("psa_projectitem0".statecode = @statecode0 and "psa_projectitem0".psa_Active = @psa_Active0 and ("psa_projectitem0".psa_ItemType in (@psa_ItemType0, @psa_ItemType1)))))) order by
     "psa_projectitem0".psa_name asc
    , "psa_projectitem0".psa_projectitemId asc',N'@psa_Project0 uniqueidentifier,@statecode0 int,@psa_Active0 bit,@psa_ItemType0 int,@psa_ItemType1 int,@psa_name0 nvarchar(200)',@psa_Project0='83D0289F-475B-E711-80ED-02BFAC10284B',@statecode0=0,@psa_Active0=1,@psa_ItemType0=4,@psa_ItemType1=5,@psa_name0=N'((("20*" OR FORMSOF(FREETEXT, "20"))) OR ("20"))'


    Any ideas?

  • gdas Profile Picture
    50,091 Moderator on at
    RE: Search fields in lookup view don't seem to work

    Did you tried with similar search criteria  in Advanced Find?

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at
    RE: Search fields in lookup view don't seem to work

    Hi,

    Before going to lookup search, are you able to search the records at entity level,

    if not then there must issue with filter/columns in quick find view.  

    if you are able to do search at entity level and not in lookup then clear all the columns and find columns then save publish again open and do the necessary configuration, it will work.

    note, as per you data the search keyword would be 10*, try this

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Search fields in lookup view don't seem to work

    I would create a new form and drop the lookup in there and see how it behaves.

    You need to do new form not save as

    And then on a record, switch to new form and try the lookup search - This should confirm its to do with Script

  • Jeroen J Profile Picture
    12 on at
    RE: Search fields in lookup view don't seem to work

    Wow..! I tried both, both with the same results as the original lookup.

    That rules out mischievous scripting, I guess?

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Search fields in lookup view don't seem to work

    Yes this confirms that there is nothing wrong with the way you configured the quick find, it also confirms that no Retrieve Multiple plugin manipulating data.  You can now focus just on the form, the issue is just on that form.

    You can add the same field multiple times on a form, i would drop the same lookup filed on a separate section or tab check if it still does the same

    And next thing to check would be to temporarily add a new lookup field to the entity and drop it on the form and see if it works

  • Jeroen J Profile Picture
    12 on at
    RE: Search fields in lookup view don't seem to work

    Hi,

    Makes sense! Thanks for the suggestion. If I 'quick find' 10 directly on the entity, it returns more results than can be displayed. Seems that the Quick Find is fine?

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Search fields in lookup view don't seem to work

    Hi

    When you go to the Project Item entity home page, and if you search in the quick find there using 10 or *10, do you get any results back?  If it does, there is no problem with the Quick Find itself.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans