Print SO Line Number on Packing Slip & Invoices on crystarl report

SOLVED

Hello Everyone,

Looking for a little help on how to print the sales order line number on Packing Slips & Invoices.

We are finding every time a partial order is shipped the line numbers are renumbered starting at one based on the remaining lines to be shipped.

We would like to retain and report the line number as reflected in the SO_SalesOrderHistoryDetails.tbl, but I am not finding any way to link the reported data back to this table.

Please note: the Item Number cannot be used, as there are many lines with duplicated item numbers, and these lines may not ship in the sequential order.

Thanks in advance for any help or ideas,

Bradley Wolosz

Hainbuch America

Plant Operations Manager 

  • 0
    SUGGESTED

    The detail table's LineKey field is very similar to most databases InternalId. Each time a new line is added, the next sequential value is assigned to the LineKey, if a line is deleted, is does not affect this sequence, if a line is reordered, it does not affect this sequence. This is a permanently assigned value to the line and is entirely based on the order of lines being added.

    The detail table's LineSeqNo field is very similar to the LineKey field but will change when lines are reordered, Sales Order Entry uses this field to determine the display order of lines on the Lines tab.

  • +1
    verified answer

    If you want a consistent line reference to the SO details, use the invoice detail table's "OrderLineKey" value.  (Pass it through to the work table using a UDF).

    The LineKey in the invoice detail table is the key for the invoice lines, not a reference to the SO detail LineKey.

  • 0 in reply to Kevin M

    Good point. I was only thinking about docs printed off sales order data but anything done from invoice data should indeed use the OrderLineKey for consistency with the sales order.

  • 0
    SUGGESTED

    I have done this before.  The easiest solution was to create a UDF field in the SO_SalesOrderDetail table to store the original line number.  Initially the user just entered the line numbers manually when entering the Sales Order, but eventually a script was written to store the value.  Hope this help!

  • 0

    To add one more suggestion. What we have done is add a UDF called PO Line Number and then enter the line number of the Purchase Order from the Customer when entering the line items. This way if there is a partial ship we can still match up what is left with the purchase order if there is a question.  

  • 0 in reply to Kevin M

    Hello Kevin,

    Thank you for your help. The OrderLineKey pulls into the SO_InvoiceWrk table and prints as expected.

    The issue I am still having is this only works the initial time an invoice is printed. if an invoice has to be reprinted more than once it goes through the AR_InvoiceHistory table and uses the same report but it does not seem to populate the report with field that had been applied in the report.

    Any ideas or suggestions on how the issue could be resolved.

    We have added the UDF to the following tables.

    SO_InvoiceWrk

    SO_PackingListWrk

    SO_ShippingHistoryWrk

    AR_InvoiceHistoryDetail

    AR_InvoiceHistoryWrk

    AR_InvoiceWrk

    Thanks,

    Brad

  • 0 in reply to BWolosz

    The invoice work table has multiple business objects, depending on where you are printing from.  You'll have to set up a UDF so the OrderLineKey flows to invoice history detail during posting, then configure the source for printing from history, on tab 3 for your work table UDF.