Default output values
Shop Floor Production (BC)
•
Article
•
8/27/2026
•
Shop Floor Production supports setting default values for a subset of Register Output fields through integration events. By subscribing to these events, a per-tenant extension (PTE) can define default behavior for the Register Output screen through AL instead of JavaScript.
Fields supported
The following fields can have default values set through integration events:
- Lot No.
- Expiration Date
- Quantity
- Tare Weight
- Scrap Quantity
- Print Label
- Comment
- Shipping Container
Events
All events include the Production Order Routing Line as a parameter, identifying which output is being registered.
For a default value to be accepted by Shop Floor Production, the
IsHandledparameter must be set totrue.
SFPBCGetFormElements14FDW.Codeunit.al
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultLotNo(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var LotNoValue: Code[50]; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultExpirationDate(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ExpDateValue: Date; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultQuantity(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var QtyValue: Decimal; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultTareWeight(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var TareWeightValue: Decimal; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultScrapQuantity(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ScrapQtyValue: Decimal; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultPrintLabel(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var PrintLabelValue: Boolean; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultComment(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var CommentValue: Text[400]; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultShippingContainer(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var AvailableShippingContainers: Record TempShippingContainer14FDW temporary; var DefaultShippingContainerValue: Code[20]; var IsHandled: Boolean)
begin
end;
Example
The following example sets a default Lot No. and a default Quantity:
[EventSubscriber(ObjectType::Codeunit, Codeunit::SFPBCGetFormElements14FDW, OnBeforeSetDefaultLotNo, '', false, false)]
local procedure SetDefaultLotNoOutput(var LotNoValue: Code[50]; var IsHandled: Boolean)
begin
LotNoValue := 'DEFAULTLOT';
IsHandled := true;
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::SFPBCGetFormElements14FDW, OnBeforeSetDefaultQuantity, '', false, false)]
local procedure SetDefaultQtyOutput(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var QtyValue: Decimal; var IsHandled: Boolean)
begin
QtyValue := ProdOrderRoutingLine."Expected Output Quantity";
IsHandled := true;
end;