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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Log standard searches

(0) ShareShare
ReportReport
Posted on by

Hello, I'm pretty new to CRM.

I would like to log standard/advanced searches in CRM on all entities. Does anyone know if there is any way to do this? Is there any way to catch the search parameters and the user when a search is done?

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi! There sure is a way to do this, but you want to be careful because you could affect performance since searches happen all over the place. You can log the search request by creating a plugin on the RetrieveMultiple message, and every time a search is made it will call your plugin and give the what the search criteria was.

    Hope this helps! If so, I would greatly appreciate if you would mark this as the verified answer.

    Thanks!

     Aiden

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    To write the plugin, you want to:

    - Create a new plugin registered on the RetrieveMultiple event, with "none" as the entity. It will run for views, advance finds or even SDK requests for every entity in CRM.

    - In the plugin code, make sure the MessageName is RetrieveMultiple, and that the InputParameters contains Query (that will be the query coming that was run)

    - The Query property will be either a FetchExpression or QueryExpression depending on where the query was initiated from.

    - When you have your expression, log it with your logger.

  • Sean Michel Profile Picture
    340 on at

    Hi Oscar,

    I'd like to ask what your goal is? Do you need to capture all searches for auditing purposes? Or was there some other reason?

    Also, are you online or on-prem?

    Thanks!

  • Community Member Profile Picture
    on at

    Hi Sean,

    The function is the request of a customer. I'm not entirely sure what the goal is because they haven't stated it clearly. I believe it is for auditing.

  • Community Member Profile Picture
    on at

    Hello aiden,

    Thanks for your advise! I was discussing it with some members of my team and we're simply gonna have to try it and see how it works performance wise.

  • Aiden Kaskela Profile Picture
    19,696 on at

    Hi Oscar, I'm happy to help. Would you mind marking my answer as the verified one? Thanks a million, Aiden

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ZS-27011425-0 Profile Picture

ZS-27011425-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans