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 Change Request] Codeunit 5988 "Serv-Documents Mgt."- OnBeforeServCrMemoLineInsert #27249

Closed
1languste opened this issue Sep 12, 2024 · 1 comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area ships-in-future-update Fix ships in a future update

Comments

@1languste
Copy link

1languste commented Sep 12, 2024

Describe the request

We want to copy the value of a blob field from the service line to the cr. memo line. To do this, we request to add the global ServLine variable as a parameter in the OnBeforeServCrMemoLineInsert event:

local procedure PrepareCrMemoLine(var PassedServLine: Record "Service Line")
begin
    // TempSrvLine is initialized (in Sales module) in RoundAmount
    // procedure, and likely does not differ from initial ServLine.
    ServCrMemoLine.Init();
    ServCrMemoLine.TransferFields(PassedServLine);
    ServCrMemoLine."Document No." := ServCrMemoHeader."No.";
    ServCrMemoLine.Quantity := PassedServLine."Qty. to Invoice";
    ServCrMemoLine."Quantity (Base)" := PassedServLine."Qty. to Invoice (Base)";
    PassedServLine.CalcFields(PassedServLine."Service Item Line Description");
    ServCrMemoLine."Service Item Line Description" := PassedServLine."Service Item Line Description";
    //NEW BEGIN
    OnBeforeServCrMemoLineInsert(ServCrMemoLine, PassedServLine, ServLine);
    //NEW END
    ServCrMemoLine.Insert();
    OnAfterServCrMemoLineInsert(ServCrMemoLine, PassedServLine);
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeServCrMemoLineInsert(var ServiceCrMemoLine: Record "Service Cr.Memo Line"; ServiceLine: Record "Service Line"; ServLine: Record "Service Line")
begin
end;

Additional context

The Blob field in the PassedServLine parameter is empty and therefore currently not copied because the TempServiceLine is passed to the procedure.
Internal work item: AB#548958

@AndersLarsenMicrosoft AndersLarsenMicrosoft added event-request Request for adding an event SCM GitHub request for SCM area labels Sep 15, 2024
@JesperSchulz JesperSchulz added the ships-in-future-update Fix ships in a future update label Sep 26, 2024
@JesperSchulz
Copy link
Contributor

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: 24747.

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 ships-in-future-update Fix ships in a future update
Projects
None yet
Development

No branches or pull requests

3 participants