Does "Create Order" or "Create Invoice" trigger plugins? RRS feed

  • Question

  • Hi everyone..

    I have a plugin on SalesOrderDetails(pre stage, post image). But when I use the "Create Order" sitemap button from the Quote screen, it does not trigger. The question is, have I missed something and how do I trigger a plugin to start on create of each of these order lines?

    Otherwise the plugin executes fine when I manually create order lines.

    Basically I have a load of custom attributes on quote lines and would like them to go across to the order line when it is created using the "create order" button. This also needs to happen from order to invoice.

    Sunday, February 22, 2009 3:05 AM


All replies

  • Hi Sin1,
    In the Plugin Registration Tool, do you use Create SalesOrder or Create SalesOrderDetail?  Have you tried both of them?
    Monday, February 23, 2009 12:05 AM
  • Hi Andy,

    I've tried a plugin for both. None are triggered.
    Monday, February 23, 2009 1:33 AM
  • It is the "Win" message on salesorder entity that you want for capturing the "Create Order" event.
    Monday, February 23, 2009 4:20 AM
  • Solution found.

    It was simple.. It turns out that since Orders and Order Lines are being generated as a "child pipeline" by the Quote, when registering the plugin, the following settings need to be selected:

    Triggering Pipeline: Child Pipeline
    - Due to running under child pipeline
    Post Stage - post stage due to running async.

    That's all to trigger the plug-in.

    Then to use the CrmService from a child pipeline, I used a snippet of code from the tamplate provided here:

    Monday, February 23, 2009 2:28 PM