Hi All,
Our end goal is to send an email to the customer from the warehouseshipment screen with the attached invoice that is generated when the warehouse shipment is posted and sales order is invoiced. We subscribed to the Warehouse Shipment (Yes/No) event which only returns the warehouseshipment. How do we get the invoice generated during this step? We tried subscribing to the Sales Post event and then the Warehouse Shipment (Yes/No) event but the sales invoice number is unable to be referenced in the second local procedure. It appears that the global variables we created get wiped in the final local procedure.
Any help is much appreciated.
Cheers,
Gareth
We have figured this one out. First off you cannot pass information from one event subscription to the next. Fortunately, code unit 80 which is the post sales line event returns all the information you need to determine what path the posted invoices has come from. It returns the invoice header and a boolean called whseShip. If this boolean is true then the sales order has been posted from the warehouse shipment screen (or has a warehouse shipment attached to it).
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156