ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 273 "Bank Acc. Reconciliation" - OnBeforeImportAndProcessToNewStatement & OnAfterConfidenceLevelPermitToPost
Hello, Is it possible to get these two events?
procedure ImportAndProcessToNewStatement()
var
BankAccount: Record "Bank Account";
BankAccReconciliation: Record "Bank Acc. Reconciliation";
DataExch: Record "Data Exch.";
DataExchDef: Record "Data Exch. Def";
DummyBankAccReconciliationLine: Record "Bank Acc. Reconciliation Line";
LastStatementNo: Code[20];
begin
//>>>>>>>>>>>>>>>>>>>>>>>>
OnBeforeImportAndProcessToNewStatement(BankAccReconciliation, DataExch, DataExchDef, IsHandled);
If IsHandled then
exit;
//<<<<<<<<<<<<<<<<<<<<<<<<
if not SelectBankAccountToUse(BankAccount, true) then
exit;
BankAccount.GetDataExchDef(DataExchDef);
DataExch."Related Record" := BankAccount.RecordId;
if not DataExch.ImportFileContent(DataExchDef) then
exit;
BankAccount.LockTable();
LastStatementNo := BankAccount."Last Statement No.";
CreateNewBankPaymentAppBatch(BankAccount."No.", BankAccReconciliation);
if not ImportStatement(BankAccReconciliation, DataExch) then begin
DeleteBankAccReconciliation(BankAccReconciliation, BankAccount, LastStatementNo);
Message(NoTransactionsImportedMsg);
exit;
end;
if not DummyBankAccReconciliationLine.LinesExist(BankAccReconciliation) then begin
DeleteBankAccReconciliation(BankAccReconciliation, BankAccount, LastStatementNo);
Message(NoTransactionsImportedMsg);
exit;
end;
Commit();
ProcessStatement(BankAccReconciliation);
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeImportAndProcessToNewStatement(var BankAccReconciliation: Record "Bank Acc. Reconciliation"; var DataExch: Record "Data Exch."; var DataExchDef: Record "Data Exch. Def"; var IsHandled: Boolean)
begin
end;
procedure ProcessStatement(var BankAccReconciliation: Record "Bank Acc. Reconciliation")
begin
CODEUNIT.Run(CODEUNIT::"Match Bank Pmt. Appl.", BankAccReconciliation);
if ConfidenceLevelPermitToPost(BankAccReconciliation) then
CODEUNIT.Run(CODEUNIT::"Bank Acc. Reconciliation Post", BankAccReconciliation)
//>>>>>>>>>>>>>>>>>>
//else
else begin
ANOOnAfterConfidenceLevelPermitToPost(BankAccReconciliation, IsHandled);
if not IsHandled then begin
if GuiAllowed then
OpenWorksheet(BankAccReconciliation);
end;
end;
//<<<<<<<<<<<<<<<<<<<
end;
[IntegrationEvent(false, false)]
local procedure OnAfterConfidenceLevelPermitToPost(var BankAccReconciliation: Record "Bank Acc. Reconciliation"; var IsHandled: Boolean)
begin
end;
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. We will update this issue with information about availability.