locked
Regarding asynchronous plugin,messages and methods RRS feed

  • Question

  • What is the difference between crm methods and messages

    why we sholud not register a plugin in asynchronous mode in pre stages(pre create,pre update) what is the reason behind it?

     

    Wednesday, April 6, 2011 2:45 PM

Answers

  • A method isn't really a term directly applicable to CRM.  Methods are a generic term for operations available via an object or class.

    Messages (in CRM) are a list of operations available via a CRM Service, eg. IOrganizationService and IDiscoveryService.

    With respect to asynchronous plugins and pre-event stages; as Jamie has alluded to, the concept doesn't make sense.  Dependent upon the load on the server, an asynchronous process could occur at any time.  It may complete within 30 seconds or it may not even start for 15 minutes.  In order for the CRM Web Service to remain responsive, any pre-event handling must not only be synchronous, it must complete as quickly as possible.


    --pogo (pat)
    Thursday, April 7, 2011 4:39 AM
  • To reply to last post, the methods are essentially just a shortcut, and may not provide all the parameters you can supply with a message, but they are handled the same by the platform. There is no useful distinction to make between the terms 'method' and 'message' as used in the CRM SDK
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Tuesday, June 7, 2011 9:31 AM
    Moderator

All replies

  • I don't know that there is much difference between the terms methods and messages.  I think they might be interchangeable considering that you are working with web services when programmatically working with CRM.

    The second question I am not as sure about.  It could cause the main operation to timeout maybe?

    I am curious, where did you see that you shouldn't register the async plugin on pre messages?

     


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Wednesday, April 6, 2011 3:13 PM
    Moderator
  • A method isn't really a term directly applicable to CRM.  Methods are a generic term for operations available via an object or class.

    Messages (in CRM) are a list of operations available via a CRM Service, eg. IOrganizationService and IDiscoveryService.

    With respect to asynchronous plugins and pre-event stages; as Jamie has alluded to, the concept doesn't make sense.  Dependent upon the load on the server, an asynchronous process could occur at any time.  It may complete within 30 seconds or it may not even start for 15 minutes.  In order for the CRM Web Service to remain responsive, any pre-event handling must not only be synchronous, it must complete as quickly as possible.


    --pogo (pat)
    Thursday, April 7, 2011 4:39 AM
  • Did you find the answer to your question?
    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Saturday, June 4, 2011 2:41 AM
    Moderator
  • Presumably Samuel is talking about the fact that some messages also have a method on the service class. So for example you can call Execute passing the RetrieveAll message or call the RetrieveAll method. As far as I'm aware the method is just a shortcut unless anyone else knows different?
    Monday, June 6, 2011 9:54 PM
  • To reply to last post, the methods are essentially just a shortcut, and may not provide all the parameters you can supply with a message, but they are handled the same by the platform. There is no useful distinction to make between the terms 'method' and 'message' as used in the CRM SDK
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Tuesday, June 7, 2011 9:31 AM
    Moderator