web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Execute Quick Find Search (Not Global) w/Javascript

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Brian Poff Profile Picture
    on at

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

  • Verified answer
    RichMephan Profile Picture
    on at

    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.

  • lbrown@infogrow.com Profile Picture
    30 on at

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans