[W1][Table][1294][Applied Payment Entry] OnBeforeSuggestAmtToApply OnBeforeAppliesToEntryNoLookup events
Why do you need this change?
Dear Microsoft Team, I would like to request two new events, OnBeforeSuggestAmtToApply and OnBeforeAppliesToEntryNoLookup, in table 1294 'Applied Payment Entry'. These events are essential for implementing custom logic related to additional Account Types in our solution.
- OnBeforeSuggestAmtToApply: This event will enable the calculation of RemAmtToApply based on custom Account Type values.
- OnBeforeAppliesToEntryNoLookup: This event will allow the use of custom filtering based on the custom Account Type values.
Describe the request
These changes are needed in BC25.
- The OnBeforeSuggestAmtToApply event in table 1294 'Applied Payment Entry' is needed to calculate the RemAmtToApply based on custom Account Type values and bypass standard logic. Proposed Event Code:
[W1][Table][1294][Applied Payment Entry]
trigger OnBeforeSuggestAmtToApply()
___
This event is needed to calculate the RemAmtToApply based on custom Account Type values.
___
[IntegrationEvent(false, false)]
local procedure OnBeforeSuggestAmtToApply(var Rec: Record "Applied Payment Entry"; var Result: Decimal; var IsHandled: Boolean)
begin
end;
Proposed Procedure Code:
procedure SuggestAmtToApply(): Decimal
var
RemAmtToApply: Decimal;
LineRemAmtToApply: Decimal;
Result: Decimal; // new variable
IsHandled: Boolean; // new variable
begin
// new begin
IsHandled := false;
OnBeforeSuggestAmtToApply(Rec, Result, IsHandled);
if IsHandled then
exit(Result);
// new end
RemAmtToApply := GetRemAmt() - GetAmtAppliedToOtherStmtLines();
...
end;
- The OnBeforeAppliesToEntryNoLookup event in table 1294 'Applied Payment Entry' is needed to use custom filtering of Customer Ledger Entry depending on the custom Account Type values and bypass standard logic. Proposed Event Code:
[W1][Table][1294][Applied Payment Entry]
trigger OnBeforeAppliesToEntryNoLookup()
___
This event is needed to use custom filtering of Customer Ledger Entry depending on the custom Account Type.
___
[IntegrationEvent(false, false)]
local procedure OnBeforeAppliesToEntryNoLookup(var Rec: Record "Applied Entry"; var IsHandled: boolean)
begin
end;
Proposed Procedure Code:
trigger OnLookup()
var
CustLedgEntry: Record "Cust. Ledger Entry";
VendLedgEntry: Record "Vendor Ledger Entry";
BankAccLedgEntry: Record "Bank Account Ledger Entry";
GLEntry: Record "G/L Entry";
IsHandled: Boolean; // new variable
begin
// new begin
IsHandled := false;
OnBeforeAppliesToEntryNoLookup(Rec, IsHandled);
if IsHandled then
exit;
// new end
case "Account Type" of
"Account Type"::"G/L Account":
...
end;
Internal work item: AB#597440
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: 38747.