General Technical Discussions for Service

Get Involved. Join the Conversation.


    Bastiaan van der Kooij
    Custom Process not triggered on Multi Edit
    Topic posted April 27, 2014 by Bastiaan van der KooijGold Crown: 30,000+ Points 
    162 Views, 2 Comments
    Custom Process not triggered on Multi Edit

    I have build a custom process on a custom object called orders. The process is triggered on create and update. The logic looks up an incident with a field that is the same as a field in the order, when a match is found the incident ID is stored in the order.

    The process is running fine when I update / create one order, however when I select more than one order and change a field to trigger the custom process, it is not working. I've tried changing the CPM to execute asynchronic but then even with one order change it feels the load is to heavy and it keeps postponing the update, let alone updating multiple orders at once.

    The CPM must eventually be triggered by large uploads from an external SOAP connection, so I need to ensure it will be triggered for each order, even when the upload has many orders at once.

    Anybody has an idea on why the CPM is not triggered for multiple Orders?


    FEB 2014



    • Bastiaan van der Kooij

      I also tried to upload orders using the Data Import Wizard, to trigger the Custom process. Enabled the checkboxes for Execute External Events and made sure there was a field that was updated. But no luck, the CPM is simply not triggered....

      Creating new orders using the Data Import Wizard does work correctly, so it is only limited to batch updates that are not triggering the CPM.

    • Bastiaan van der Kooij

      Ok continuing with my monologue; I have fixed the issue. Apparently during a multi update (and only multi), the only available fields in the object are the ones that are edited during this update together with the main ID. All other fields are not set, so I needed to fetch the object in the custom process when it was updated to work with the fields I needed. 

      No I am fetching the object for each update, like;

              if (RNCPM\ActionUpdate == $action)
                  $order = RNCPHP\Orders\OrderHeader::fetch($order->ID);