locked
Message or Event to fire a plugin in CRM 2011 RRS feed

  • Question

  • Hi,

    I want to fire a plugin when a record is opened from homepage grid. I get Account records on selecting Account from Site Map now when i select a record from Account to be opened i want to fire a plugin before the form  or record is opened. On which message should i register the plugin.

    Thanks in Advance,

     

     

    Thursday, January 19, 2012 10:03 AM

Answers

  • UI cannot be handled through Plugins i guess. Plugins work behind the scenes. You can write a plugin but that wouldnt impact the the screen/form layout.

    When you open a record from the grid, it is the Retrieve or R

    One way to avoid the flickering would be initially hide all controls on the form and only after the desired form has been navigated, show the fields on the form. Or perhaps a section that is common to all forms is visible at all times and then the others are displayed based on the form navigation.

    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"

    Monday, January 23, 2012 8:23 AM

All replies

  • Try registering your plugin on Retrieve message for account entity.

    Thank you.

    JayshriP

    Thursday, January 19, 2012 10:41 AM
  • Hi,

    Retrieve and Retrieve Multiple doesnt did not wrk in my case.

    Thursday, January 19, 2012 11:29 AM
  • Hi Prasad,

    Can you please explain your scenarion once again?

    Because plugin registered on "Retrieve" message must work. When we select Accounts from sitemap e.g. Workplace/Sales->Accounts, it sends "RetrieveMultiple" request to platform and when we open perticular record from HomePage grid, it sends "Retrieve" request to platform.

    Thank you.

    JayshriP

    Thursday, January 19, 2012 12:58 PM
  • Hi,

    I have already tried with Retrive, Retrive message triggers plugin after opening form, I want to trigger my plugin on a grid click before opening form so that meanwhile i can change  the LastViewedForm property of that form. I am checking the form type in plugin and i want to change Form type before opening form.

    Thursday, January 19, 2012 1:58 PM
  • Hello Prasad,

    if you want to fire plugin before opening an account form, you must register a step on prevalidation or preoperation event based on retrieve message of account entity.

    But, with this solution, you will not be sure that the plugin is fire by opening the form account.  

     

    Thursday, January 19, 2012 2:05 PM
  • Hi Prasad,

    If you register the plugin on Pre-event in synchronous mode then surely it will trigger before opening the form. Once plugin execution is complete, form opens.

    You need to check with your plugin logic.

    Thank you.

    JayshriP

    Friday, January 20, 2012 5:05 AM
  • Do you want to auto populate the values of some fields of an entity when you open a form? Should that be the case you should instead write script on the onload event of the form. The scripts fire only when a user manually opens the form. I believe this is the condition you are looking for.

    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"

    • Proposed as answer by Sam - Inogic Saturday, January 21, 2012 2:21 AM
    Saturday, January 21, 2012 2:21 AM
  • Hi Sam,

    Thanks for your reply. We have two forms and i want to open a desired form and not the last viewed one based on the record selected. javascript helped me but there was a flicker of the form reloading which our client does not want. So i have tried writing a plugin but not sure of the event/message  to fire it.

    Thanks,

     

     

    Monday, January 23, 2012 6:55 AM
  • UI cannot be handled through Plugins i guess. Plugins work behind the scenes. You can write a plugin but that wouldnt impact the the screen/form layout.

    When you open a record from the grid, it is the Retrieve or R

    One way to avoid the flickering would be initially hide all controls on the form and only after the desired form has been navigated, show the fields on the form. Or perhaps a section that is common to all forms is visible at all times and then the others are displayed based on the form navigation.

    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"

    Monday, January 23, 2012 8:23 AM