This post accompanies the corresponding Youtube recording that can be viewed below.
The intent of this post is simply to make the custom logic code available, if it helps.
* Custom Logic to bring the Freight Order number associated with a delivery * Absolutely necessary move-corresponding delivery_document_in to delivery_document_out. * Since the delivery is created from the freight order, it is assumed that all items in a * delivery will be associated to the same order, hence we just read a single record for a * delivery to find the associated Freight Order. if this was not correct, the logic could * could be changed to also include the item, but the custom field would also need to exist * at the item level in that case. IF delivery_document_in-deliverydocumenttype = 'LF'. SELECT SINGLE TransportationOrder FROM YY1_PREFreightAnalysis INTO @delivery_document_out-yy1_freightorder_dlh WHERE Short_dlv = @delivery_document_in-deliverydocument. SHIFT delivery_document_out-yy1_freightorder_dlh LEFT DELETING LEADING '0'. endif.