[Event Request] Report "Job Transfer to Sales Invoice" & "Job Transfer to Credit Memo" OnBeforeSetCustomer
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
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.