ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] table 11000003 "Detail Line" - OnBeforeCalculateTotalAmountSetCurrentKey
Hello,
In GitHub request #16976, it was requested for an event before setting the key:
local procedure CalculateTotalAmountSetCurrentKey(var DetailLine: Record "Detail Line")
var
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeCalculateTotalAmountSetCurrentKey(DetailLine, IsHandled); // <<New Event>>>
if IsHandled then
exit;
DetailLine.SetCurrentKey("Account Type", "Serial No. (Entry)");
end;
In BC 20.1.39959.0, an event was created after setting the key:
local procedure SetKeyForCalculateTotalAmount(var DetailLine: Record "Detail Line")
begin
DetailLine.SetCurrentKey("Account Type", "Serial No. (Entry)");
OnAfterSetKeyForCalculateTotalAmount(DetailLine);
end;
We need the event before setting the key because we need to set a different key, containing more fields then the ones mentioned.
Can you please have a look?
Thank you.
You can set whatever key you want using the DetailLine provided by calling SetCurrentKey on it...
I understand. Thank you.