ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Table 901 "Assembly Line" procedure MaxQtyToConsume() - new event OnAfterMaxQtyToConsume, procedure MaxQtyToConsumeBase() - new event OnAfterMaxQtyToConsumeBase

Open ACJStopka opened this issue 5 months ago • 4 comments

Why do you need this change?

The customer requests to include a new field on the "Assemble Line" record in the calculation of the MaxQtyToConsume and MaxQtyToConsumeBase values. The new fields were created by customizing the "Assembly Line" table.

Describe the request

procedure MaxQtyToConsume() MaxQty: Decimal
begin
    MaxQty := "Remaining Quantity";
    OnAfterMaxQtyToConsume(Rec, xRec, MaxQty);
end;

local procedure MaxQtyToConsumeBase() MaxQtyBase: Decimal
begin
    MaxQtyBase := "Remaining Quantity (Base)";
    OnAfterMaxQtyToConsumeBase(Rec, xRec, MaxQtyBase);
end;

[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsume(Rec: Record "Assembly Line"; xRec: Record "Assembly Line"; var MaxQtyToConsume: Decimal)
begin
end;

[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsumeBase(Rec: Record "Assembly Line"; xRec: Record "Assembly Line"; var MaxQtyToConsumeBase: Decimal)
begin
end;

Internal work item: AB#640855

ACJStopka avatar Jun 25 '26 12:06 ACJStopka

Hi @ACJStopka,

Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.

📚 Extensibility Guidelines

Missing Information:

  • Justification for xRec parameters: Please explain why subscribers need previous values (xRec) in OnAfterMaxQtyToConsume and OnAfterMaxQtyToConsumeBase, instead of only the current Assembly Line record and the calculated result.

Please update the issue with the missing details. We'll automatically re-analyze once updated.

[!NOTE] Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.

[!TIP] Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.

github-actions[bot] avatar Jun 25 '26 13:06 github-actions[bot]

xRec is not needed

ACJStopka avatar Jun 29 '26 09:06 ACJStopka

✅ Analysis complete - ready for further processing


Implementation:

Add OnAfterMaxQtyToConsume and OnAfterMaxQtyToConsumeBase integration events to table 901 Assembly Line after the default values are assigned in MaxQtyToConsume() and MaxQtyToConsumeBase().

Location in MaxQtyToConsume() and MaxQtyToConsumeBase() procedures:

procedure MaxQtyToConsume() Result: Decimal
begin
    Result := "Remaining Quantity";
    OnAfterMaxQtyToConsume(Rec, Result);
end;

local procedure MaxQtyToConsumeBase() Result: Decimal
begin
    Result := "Remaining Quantity (Base)";
    OnAfterMaxQtyToConsumeBase(Rec, Result);
end;

Event Publisher (add at the end of the codeunit with other events):

[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsume(var AssemblyLine: Record "Assembly Line"; var MaxQtyToConsume: Decimal)
begin
end;

[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsumeBase(var AssemblyLine: Record "Assembly Line"; var MaxQtyToConsumeBase: Decimal)
begin
end;

File: AssemblyLine.Table.al

[!NOTE] Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.

[!TIP] Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.

github-actions[bot] avatar Jun 29 '26 14:06 github-actions[bot]

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.

AleksandricMarko avatar Jul 02 '26 07:07 AleksandricMarko