ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[W1][Table][81][Gen. Journal Line] OnBeforeUpdateLineBalance event

Open polina-se opened this issue 1 year ago • 3 comments

Why do you need this change?

Dear Microsoft Team, I would like to request a new event, OnBeforeUpdateLineBalance, in table 81 'Gen. Journal Line'. This event is needed for the following purposes:

  1. To bypass the standard logic that assigns values to the CR and DR fields. My solution includes business processes that require different signs or values for these fields.
  2. To assign a different value to the Amount (LCY) field to meet specific business requirements.

Describe the request

This change is needed in BC25.

Proposed Event Code:

[W1][Table][81][Gen. Journal Line]
trigger OnBeforeUpdateLineBalance()
___
This event is needed to bypass the standard logic that assigns values to the CR and DR fields and to assign a different value to the Amount (LCY) field.
___
[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateLineBalance(var GenJournalLine: Record "Gen. Journal Line")
begin
end;

Proposed Event Placement:

procedure UpdateLineBalance()
begin
   OnBeforeUpdateLineBalance(Rec); // new event
    "Debit Amount" := 0;
...

Internal work item: AB#597446

polina-se avatar Aug 15 '25 09:08 polina-se

@polina-se which lines of UpdateLineBalance do you want to bypass? Your suggestion will not bypass any of the existing logic, it will just execute after the event

AndreasHans avatar Aug 22 '25 07:08 AndreasHans

Hi, We have custom logic there as we use different currencies, so you are right that we do not just bypass.

Image

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

JesperSchulz avatar Aug 29 '25 07:08 JesperSchulz