locked
CRM2011: When was RetrieveMultiple triggered? RRS feed

  • Question

  • Hi,

    We are doing a POC on how to integration custom search enginer when user perform Quick Search.

    It seems that the trigger point to call the custom API is through retrievemultiple event and we actualy find a way to trigger it. To double confirm the approach is working, we need to check besides quick search, what other action / operation will trigger retrieve multiple? All I can think of: Advanced Find, Quick Search, List View.

    Please help.


    Monday, February 20, 2012 6:01 AM

Answers

All replies

  • You are right on

     Advanced Find, Quick Search, List View (every view of every entity such as default views, associated view etc).

    It can be triggered by manual request in custom code like plugins etc.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Monday, February 20, 2012 6:30 AM
  • hi,

    how about report? When select from filteredview does it trigger retrivemultiple?

    Thursday, February 23, 2012 2:21 AM
  • Hi

    The answer is no as filterview does not use webservices to retrieve the data. Having said that the report can trigger the retrivemultiple if the report is using fetch xml.

    Regards


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Thursday, February 23, 2012 6:00 AM
  • Reports do not trigger plugins. SQL reports bypass CRM completely, and Fetch reports also bypass the plugin pipeline

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk


    Thursday, February 23, 2012 6:03 AM
    Moderator
  • David already answered this but I want to just mention that, strange as it may seem, fetchXML reports definitively do NOT trigger retrieveMultiple - I was burned by this before. :) 

    Thursday, February 23, 2012 10:11 PM
  • if i am not mixing things up, fetch queries are processed by service.execute. To capture fetch requests you might need to trap the execute message through plugin. HTH Sam

    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, February 23, 2012 11:53 PM
  • Just to clarify the last post, in CRM 2011 fetch queries are submitted via the RetrieveMultiple message, whereas in CRM 4 they were submitted via the Fetch message and (bizarrely) you could handle them in plugins on the Execute message

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk


    Wednesday, March 28, 2012 2:32 PM
    Moderator
  • Thanks for the correction, David.

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, March 28, 2012 3:03 PM

  • Hi David,

    So, there is now way we can capture the request for CRM 2011 FetchXML reports using Plug-in. Please confirm this.

    Thursday, May 3, 2012 9:59 PM
  • Hi David and CRM Rocks : I have a fecthXml report. I created a RetrieveMultiple event that hooks to any entity being queried.

    While debugging, when running the report, the Execute of the RetrieveMultiple event method never gets fired. So in CRM 2011 fetch queries ARE NOT are submitted via the RetrieveMultiple message!

    However, I did capture the request using plugin by creating a step that subscribe to the Execute message of ANY entity. When running the report, the execute method is fired. This how you can capture the request for FetchXML.

    I have a question to you guys :

    In the same context, I am trying to modify the results of the query in a post operation like this : context.outputparameters["FetchXmlResult"] = someModifiedResults.

    When I check the results in the outputparameters at the end of the Execute method, they are set to the new provided results. But when my report effectively shows, it only shows the original non modified results. How can I modify the results in the post operation so that they appear in the report being run?

    • Proposed as answer by Zouma Tuesday, May 22, 2012 5:17 PM
    Friday, May 18, 2012 10:10 PM
  • Seems that reports do not trigger plugins. What fires the Execute method is something else, not the query itself!!! It seems that the execute is fired when report are trying to get the filter defined by the user.

    • Proposed as answer by Zouma Tuesday, May 22, 2012 5:26 PM
    Tuesday, May 22, 2012 5:26 PM