Manual back order release logic questions

Hello!

We are extending ReleaseBackordersToSalesOrderLines and have a couple questions.

  1. Why do we care about last record? Based on a little research it seems specific to settings/config.
  2. Why do sort by sales order header on your fetch in line?
  3. Is there any ‘fetch distinct’ done to modularize logic called between salesorderheader vs item vs customer etc? We want to queue and event per SOHeader and want to see if there is a place that makes more sense for that (other than extension at the end) or if there is a method to mimic.

As per usual let me know if any of this does not make sense :slight_smile:

Hello @ellen.kaufman !

  1. The backorder release uses the last record so the update of all sales order details only happens once.
  2. There could be multiple sales orders with the same item and a limited on hand quantity. The sort is used so the backorder release can produce consistent results. So if there are multiple sales orders with the same item or on one sales order, the same item multiple times, then the release will start with the smallest sales order ID and smallest line number, and attempt to release in order.
  3. There is a logic block that is on the newer side - BackorderReleaseBySalesOrderHeader - this logic block could be called one sales order at a time to execute the backorder release.
3 Likes