[Event Request] Codeunit 5055 "CustVendBank-Update" - OnAfterUpdateBankAccountProcedure
Please add a new event 'OnAfterUpdateBankAccountProcedure' to procedure 'UpdateBankAccount', as already available in 'UpdateCustomer' and 'UpdateVendor', to be able to make final modifications to the concerning Contact.
procedure UpdateBankAccount(var Cont: Record Contact; var ContBusRel: Record "Contact Business Relation")
begin
with BankAcc do begin
Get(ContBusRel."No.");
NoSeries := "No. Series";
OurContactCode := "Our Contact Code";
Validate("Currency Code", Cont."Currency Code");
BankAccountCopyFieldsFromCont(Cont);
"No." := ContBusRel."No.";
"No. Series" := NoSeries;
"Our Contact Code" := OurContactCode;
"Last Date Modified" := Today;
OnAfterUpdateBankAccount(BankAcc, Cont, ContBusRel);
Modify;
end;
//----------------------------------------OnAfterUpdateBankAccountProcedure:BEGIN
OnAfterUpdateBankAccountProcedure(BankAcc, Cont, ContBusRel);
//----------------------------------------OnAfterUpdateBankAccountProcedure:END
end;
//----------------------------------------OnAfterUpdateBankAccountProcedure:BEGIN
[IntegrationEvent(false, false)]
local procedure OnAfterUpdateBankAccountProcedure(var BankAccount: Record "Bank Account"; var Contact: Record Contact; var ContBusRel: Record "Contact Business Relation")
begin
end;
//----------------------------------------OnAfterUpdateBankAccountProcedure:END
Couldn't you use the OnAfterUpdateBankAccount two lines above your requested event?
The parameter for Contact is not by reference in event 'OnAfterUpdateBankAccount'. Adding 'var' in front of the parameter would also do the trick, but I've requested for this new event to keep in sync with 'UpdateCustomer' and 'UpdateVendor.
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.