I need to show the customer order on the Shipment Master form. I'm planning to use a derived column however I don't remember the SQL to get the CoNum from the order. Any help is appreciated. Thanks in advance.
Make an edit field on the Shipment Master form and bind it to object2.RefNum as you already have the data available?
I am curious to see other answers.
SELECT sm.shipment_id,co.co_numFROM dbo.shipment smINNER JOIN dbo.shipment_line sl ON sl.shipment_id = sm.shipment_idINNER JOIN dbo.pick_list_ref AS plr ON plr.pick_list_id = sl.pick_list_id AND plr.sequence = sl.pick_list_ref_sequence AND plr.ref_type = 'O'INNER JOIN dbo.co ON co.co_num = plr.ref_num--INNER JOIN dbo.coitem AS coi ON coi.co_num = plr.ref_num-- AND coi.co_line = plr.ref_line_suf-- AND coi.co_release = plr.ref_releaseWHERE sm.shipment_id = @ShipmentID
Thanks! I remember that it was complicated. I'm in the cloud version now and don't have access to the database so thank you for helping out.
SqlDataViewer, available on the Infor Marketplace for free, enables you to execute SQL queries within your cloud environment.
Note that SELECT * is not supported; you must specify the desired column names. The "SQL Tables" and "SQL Columns" forms can assist you in identifying available tables and their respective columns.
SELECT *
Give that person a gold star! Thank you so much!