[Event Request] codeunit 90 "Purch.-Post" - OnDeleteAfterPostingBeforeDelete
Hello, would it be possible to add OnDeleteAfterPostingBeforeDelete, event to codeunit 90 "Purch.-Post", like this:
local procedure DeleteAfterPosting(var PurchHeader: Record "Purchase Header")
...
exit;
with PurchHeader do begin
IsHandled := false;
> OnDeleteAfterPostingBeforeDelete(PurchHeader, IsHandled);//New Event
if not IsHandled then begin
if HasLinks then
DeleteLinks();
Delete();
end;
[IntegrationEvent(false, false)]
local procedure OnDeleteAfterPostingBeforeDelete(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;
Can you provide full code of procedure, if you start with BEGIN, we need to understand where the BRGIN part should END? We cannot process this requests for now.
I have updated the request accordingly. END was added after Delete() statement
So you want to skip delete of header but still delete all lines? Did I understand this correctly?
Why do you need this event at all, you already can use this event and replace our code with yours?
OnBeforeDeleteAfterPosting(PurchHeader, PurchInvHeader, PurchCrMemoHeader, SkipDelete, SuppressCommit, TempPurchLine, TempPurchLineGlobal);
if SkipDelete then
exit;
We do not want to add many small events for small pieces of code, this is very tricky to manage.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 11042.