ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Report "Job Transfer to Sales Invoice" & "Job Transfer to Credit Memo" OnBeforeSetCustomer

Open kristjano opened this issue 2 years ago • 1 comments

Describe the request

I need to be able to select different customer then selected on Job or Job Task.

Code change in report "Job Transfer to Sales Invoice":

procedure SetCustomer(JobPlanningLine: Record "Job Planning Line")
var
    JobTask: Record "Job Task";
    IsHandled: Boolean;
begin
    Job.Get(JobPlanningLine."Job No.");
    IsHandled := false;
    OnBeforeSetCustomer(JobPlanningLine, BillToCustomerNo, SellToCustomerNo, CurrencyCode, IsHandled);
    if IsHandled then
        exit;
    ...
end;

Code change in report "Job Transfer to Credit Memo":

procedure SetCustomer(JobPlanningLine: Record "Job Planning Line")
var
    JobTask: Record "Job Task";
    IsHandled: Boolean;
begin
    Job.Get(JobPlanningLine."Job No.");
    IsHandled := false;
    OnBeforeSetCustomer(JobPlanningLine, BillToCustomerNo, IsHandled);
    if IsHandled then
        exit;
    ...
end;

Signature in report "Transfer to Sales Invoice":

[IntegrationEvent(false, false)]
local procedure OnBeforeSetCustomer(JobPlanningLine: Record "Job Planning Line"; var BillToCustomerNo: Code[20]; var SellToCustomerNo: Code[20]; var CurrencyCode: Code[20]; var IsHandled: Boolean)
begin
end;

Signature in report "Transfer to Credit Memo":

[IntegrationEvent(false, false)]
local procedure OnBeforeSetCustomer(JobPlanningLine: Record "Job Planning Line"; var BillToCustomerNo: Code[20]; var IsHandled: Boolean)
begin
end;

Additional context

We need to handle it differently how we set the customer from Job Planning Line. Internal work item: AB#545029

kristjano avatar Aug 16 '24 14:08 kristjano

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

JesperSchulz avatar Aug 22 '24 20:08 JesperSchulz