Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Determine sales post event from warehouse shipment event

Posted on by 86

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

  • Verified answer
    garydee Profile Picture
    garydee 86 on at
    RE: Determine sales post even from warehouse shipment event

    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).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans