Greetings to all of you.
The case:
I need , when a sales order is invoiced in the COMPANY A, this sales order, before it gets deleted and become archive sales order, to be migrated in Company B. ( as an open sales order).
I basically try to find an event which runs after posting but before deleting the sales order and transforming it to the archive one (at this moment i dont care about the posted document,only for the sales order just before it gets deleted after posting action).
Does anyone know any useful event to subscribe on?
With respect,
Antonis
Great answer fellow friend!
I was using a similar event to what you proposed, but your event is even better , so it did the job perfectly.
Thanks a lot
Hi,
You can try below Event in Codeunit 80
OnBeforeHandleArchiveUnpostedOrder
You can use OnBeforeDeleteAfterPosting event from Codeunit 80 "Sales-Post"
local procedure OnBeforeDeleteAfterPosting(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SkipDelete: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary)
begin
end;
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,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156