Data Directive on OrderHed Creating Drop Ship PO -- Not Linking OrderRel

Hey there,

From Order Entry, I’m creating a drop-ship PO for all the releases on the order with BTO Drop Ship marked. Of course, the PO Business Object clashed with the SO BO in the method directive, so I farmed it out to a Data Directive.

It creates the PO okay, but the order release doesn’t get linked to the PO release – as in, the PONum, POLine, and PORelNum fields all contain 0 after we’re done.

I’ve tried hitting the DD from a couple of different routes:

Catching OrderHed.ReadyToFulfill changing to true

and

Using a method directive to change OrderHed.UserChar4 to “FirePOUpdate.”

The method directive (post) does the following things:

  1. Code to set UserChar4 (so the DD will fire) with a SO BO with IgnoreFacade set to true and SO update (enclosed in trans scope)

  2. GetyByID widget (to hopefully get the ds back with the order release linked)

  3. Code to clear UserChar4 with a SO BO with IgnoreFacade set to true and SO update (enclosed in trans scope)

  4. GetByID widget

Could it be that the DD isn’t running synchronously during #1? I’ve tried to poke the po/line/rel numbers into the order release at step #3 above, but I don’t find it there. If it isn’t running synchronously, is there a way to force it to do so?

The PO gets set up okay and the drop ship entry and invoicing all work, but it’s possible to create multiple duplicate purchase orders because the order release doesn’t see the PO release as being connected. The PO links okay if I create it manually.

Any other experience/suggestions?

This is being run in 10.1.500.

Thanks,

Joe

Update:

I went into the DD and set OrderRel.PONum, OrderRel.POLine, and OrderRel.PORelNum to the PO release just created. Seems to work. We’ll see what blows up.

Joe