Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Execute Quick Find Search (Not Global) w/Javascript

Posted on by

We are using a custom web resource and need to perform a user-initiated search of several entities. We have tried using "parent.Xrm.Internal.messages.executeQuickFind" but it limits the results per entity to approximately 80 records as it really is a global search. We cannot use a custom FetchXML query as the code needs to work with multiple organizations that might have custom fields selected in the Quick Find view. Ideally we want to execute the Quick Find view with the value typed by the user against each of the appropriate entities. 

You can easily get the ID of the Quick Find View like this: 

urlgoeshere/.../savedqueries$select=name,savedqueryid&$filter=name eq 'Quick Find Active Accounts'

However this is not helpful as there doesn't seem to be a way to execute this view by modifying it to search for your value (for example I may want to search for "New York" just like in the entity search box). 

Is it possible to retrieve the FetchXML for a system view using .js? I presume it is but Google is not very helpful as the terms are very generic and you get almost 100% irrelevant results. Or if anyone has a better suggestion it would be much appreciated.

*This post is locked for comments

  • RE: Execute Quick Find Search (Not Global) w/Javascript

    Hi Rich,

    Maybe you can answer my question.  I need to pull all the saved and user queries for a single entity.  Do you know the call for this?

    Thanks,

  • Verified answer
    RichMephan Profile Picture
    RichMephan on at
    RE: Execute Quick Find Search (Not Global) w/Javascript

    Hi Brian,

    I think it is possible to do what you want, assuming I understand your requirements, you need to include the fetchXML and layoutXML fields in your query as per below.

    "/api/data/v8.1/savedqueries?$select=name,savedqueryid,fetchxml,layoutxml&$filter=startswith(name)"

    With the information stored in the fetchXML and layourXML fields you should be able to craft the call to the saved view, albeit you wont be calling the actual saved view, you are using the metadata from the saved view query to craft your own custom call of that view, you can then filter that custom call however you want.

  • Brian Poff Profile Picture
    Brian Poff on at
    RE: Execute Quick Find Search (Not Global) w/Javascript

    Also I forgot to mention the entities we need to search are not necessarily selected for the Global Search.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans