Skip to main content

Notifications

Announcements

No record found.

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

  • ashlega Profile Picture
    34,477 on at
    RE: OData execution of a Quick Find savedquery

    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)

  • James Profile Picture
    2 on at
    RE: OData execution of a Quick Find savedquery

    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
    RE: OData execution of a Quick Find savedquery

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans