Automating backorder processing in 7  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Re: Automating backorder processing in 7

Postby Mike.Sheen » Fri Jun 16, 2017 11:17 am

pricerc wrote:Cool.

and now for the next tricky bit. Not sure why I didn't think to ask this question earlier as well:

Can I get a list of orders that were released by the process so that I can send them to printers and/or EDI?

Or can I build/process the list myself using the ProcessSnapshotCreated event?


The table SO_BORun is inserted into for each BO Process run. The table SO_BORunLines links to that and a row inserted for each backorder released on the run. The MAX(SO_BORun.RunNo) will be the most recent run.

If you're only interested in backorders released to sales orders, you can join in the sales order tables - e.g.:

Code: Select all
SELECT SO_BORunLines.*, SO_Lines.PartNo, SO_History.HistoryNo, SO_Main.InvoiceNo
FROM SO_BORunLines
JOIN SO_BORun ON SO_BORun.RunID = SO_BORunLines.RunID
JOIN SO_Lines ON SO_Lines.InvoiceLineID = SO_BORunLines.SourceLineID
JOIN SO_History ON SO_History.InvoiceHistoryID = SO_Lines.InvoiceHistoryID
JOIN SO_Main ON SO_Main.InvoiceID = SO_History.InvoiceID
WHERE SO_BORun.RunNo = (SELECT MAX(SO_BORun.RunNo) FROM SO_BORun)
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 13 guests