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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

OData execution of a Quick Find savedquery

(0) ShareShare
ReportReport
Posted on by 2

Hi all

I'm aware of the ability to execute a saved query/system view against an entity (GET [Organization URI]/api/data/v8.2/accounts?savedQuery=00000000-0000-0000-00aa-000010001002), but how do I add the search term if it's a Quick Find query? I know the FetchXML query has a value={0} element, but I can't pass in a "value" parameter - CRM errors saying "No Other Query options supported when SavedQuery or UserQuery or FetchXml option is provided".

Obviously the alternative is to just return the FetchXML, do the replacement of the {0}, and then execute that, but it seems inelegant compared to the ?savedQuery mechanism?

P.S. I'm doing this in JavaScript from a web resource, although I don't think that changes the question at all?

Thanks
James

*This post is locked for comments

I have the same question (0)
  • ashlega Profile Picture
    34,477 on at

    Hi,

     I don't think you can do it that way - CRM take care of updating FetchXml when executing quick find (it does not pass a parameter to the fetch). So you might do the same - have a fetchXml there, update it for each query (add filters etc), then run that fetch.

     Or you can use filtering in Web API (without fetch):

    msdn.microsoft.com/.../gg334767.aspx

  • James Profile Picture
    2 on at

    Thanks Alex. That's unfortunate - I found the execution of the Saved Queries elegant. We need to mimic the Quick Find mechanism by default, so creating filters isn't going to do the trick, unfortunately. We'll stick to downloading the fetchXML, replacing the {0}, and executing that.

    I'm going to leave this open for 48 hours before marking as answer just in case someone knows of any additional information.

    Thanks

  • ashlega Profile Picture
    34,477 on at

    Sure.. Also, this may give you a bit more details on the internal "mechanics" of the Quick Find:

    www.itaintboring.com/.../configuring-quick-find-to-search-in-the-related-entities

    Basically, if you register a plugin in the pre-retrieveMultiple, you'll see how the search keyword is added to the filter conditions (which likely means that CRM is doing some client-side pre-processing before running that fetch, but, in the end, who knows)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans