Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[event publisher change] in event "Inventory Profile Offsetting" (Codeunit 99000854) #28444

Open
bhorvath9815 opened this issue Apr 1, 2025 · 0 comments
Labels
event-request Request for adding an event SCM GitHub request for SCM area

Comments

@bhorvath9815
Copy link

bhorvath9815 commented Apr 1, 2025

Describe the request

Dear Support,

Could you please modify the publisher in "Inventory Profile Offsetting" (Codeunit 99000854) and a bit the following code? The publisher name is: "OnAfterUpdateAppliedItemEntry".

<<<<< Original Code >>>>>
    [IntegrationEvent(false, false)]
    local procedure OnAfterUpdateAppliedItemEntry(var ReservationEntry: Record "Reservation Entry"; var TempItemTrackingEntry: Record "Reservation Entry")
    begin
    end;
local procedure UpdateAppliedItemEntry(var ReservEntry: Record "Reservation Entry")
var
    ItemTrackingSetup: Record "Item Tracking Setup";
begin
    TempItemTrkgEntry.SetSourceFilter(
        ReservEntry."Source Type", ReservEntry."Source Subtype", ReservEntry."Source ID", ReservEntry."Source Ref. No.", true);
    ItemTrackingSetup.CopyTrackingFromReservEntry(ReservEntry);
    TempItemTrkgEntry.SetTrackingFilterFromItemTrackingSetupIfNotBlank(ItemTrackingSetup);
    OnUpdateAppliedItemEntryOnBeforeFindApplEntry(TempItemTrkgEntry, ReservEntry);
    if TempItemTrkgEntry.FindFirst() then begin
        ReservEntry."Appl.-from Item Entry" := TempItemTrkgEntry."Appl.-from Item Entry";
        ReservEntry."Appl.-to Item Entry" := TempItemTrkgEntry."Appl.-to Item Entry";
    end;

    OnAfterUpdateAppliedItemEntry(ReservEntry, TempItemTrkgEntry);
end;

<<<<< Modified >>>>>

    [IntegrationEvent(false, false)]
    local procedure OnAfterUpdateAppliedItemEntry(var ReservationEntry: Record "Reservation Entry"; var TempItemTrackingEntry: Record "Reservation Entry";ReqLine: Record "Requisition Line")
    begin
    end;
local procedure UpdateAppliedItemEntry(var ReservEntry: Record "Reservation Entry")
var
    ItemTrackingSetup: Record "Item Tracking Setup";
begin
    TempItemTrkgEntry.SetSourceFilter(
        ReservEntry."Source Type", ReservEntry."Source Subtype", ReservEntry."Source ID", ReservEntry."Source Ref. No.", true);
    ItemTrackingSetup.CopyTrackingFromReservEntry(ReservEntry);
    TempItemTrkgEntry.SetTrackingFilterFromItemTrackingSetupIfNotBlank(ItemTrackingSetup);
    OnUpdateAppliedItemEntryOnBeforeFindApplEntry(TempItemTrkgEntry, ReservEntry);
    if TempItemTrkgEntry.FindFirst() then begin
        ReservEntry."Appl.-from Item Entry" := TempItemTrkgEntry."Appl.-from Item Entry";
        ReservEntry."Appl.-to Item Entry" := TempItemTrkgEntry."Appl.-to Item Entry";
    end;

    OnAfterUpdateAppliedItemEntry(ReservEntry, TempItemTrkgEntry, ReqLine);
end;

Additional context

We need to skip the Release part of the code for several times due to a customer condition.

Thank you in advance.
Internal work item: AB#572971

@JesperSchulz JesperSchulz added event-request Request for adding an event SCM GitHub request for SCM area labels Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area
Projects
None yet
Development

No branches or pull requests

2 participants