Custom detail information

Shop Floor Production (BC)  •  Article  •  8/27/2026  • 

Custom detail information lets you add additional summary text and comments to the Shop Floor Production Production Order screen via a per-tenant extension (PTE). This information is displayed dynamically alongside the standard detail information already shown by the app.

Custom summary text

OnGetProductionOrderCustomSummaryText lets you set custom input and output summary text on the Production Order screen. InputText is shown as an extra line at the bottom of the Input summary card, and OutputText is shown the same way on the Output summary card. Each line is only displayed when it is not blank.

SFPBCCustomSummaryText14FDW.Codeunit.al

[IntegrationEvent(false, false)]
local procedure OnGetProductionOrderCustomSummaryText(ProdOrderNo: Code[20]; ProdOrderLineNo: Integer; RoutingNo: Code[20]; OperationNo: Code[10]; var InputText: Text; var OutputText: Text)
begin
end;

ProdOrderNo, ProdOrderLineNo, RoutingNo, and OperationNo represent the currently selected production order operation.

Example

[EventSubscriber(ObjectType::Codeunit, Codeunit::SFPBCCustomSummaryText14FDW, OnGetProductionOrderCustomSummaryText, '', false, false)]
local procedure PopulateCustomSummaryText(ProdOrderNo: Code[20]; var InputText: Text; var OutputText: Text)
var
    InputTextLbl: Label 'Consumption notes for %1', Comment = '%1 = Production Order No.';
    OutputTextLbl: Label 'Output notes for %1', Comment = '%1 = Production Order No.';
begin
    InputText := StrSubstNo(InputTextLbl, ProdOrderNo);
    OutputText := StrSubstNo(OutputTextLbl, ProdOrderNo);
end;

Production order comments

OnAfterGetProductionOrderComments lets you append additional comment entries to the list of production order comments shown in the app. The standard comments (from Prod. Order Comment Line and linked Sales Comment Line records) are already loaded before this event fires.

SFPBCProdOrderCommentLine14FDW.Codeunit.al

[IntegrationEvent(false, false)]
local procedure OnAfterGetProductionOrderComments(ProductionOrderNo: Code[20]; var ProdOrderCommentLineArray: JsonArray)
begin
end;

Comment records added to ProdOrderCommentLineArray must have the following structure:

FieldTypeDescription
prodOrderNostringProduction order number.
lineNonumberSort key for the comment. The app displays comments in ascending lineNo order; it does not otherwise use this value.
dateDateRequired to keep the record shape consistent with the standard Prod. Order Comment Line/Sales Comment Line structure; not currently rendered in the comment list.
commentstringComment text (max 80 characters).

Standard comments (both Prod. Order Comment Line and Sales Comment Line) start at line number 10000 and increment by 10000. Using a lower value — including 0 or a negative number — sorts a custom comment above the existing ones.

lineNo is also the key the app sends back when a user edits or deletes a comment through the standard comment list. Because a comment added by this event has no backing Prod. Order Comment Line record, attempting to edit or delete it through the app fails with "Comment not found." If you need in-app edit/delete support, create a real Prod. Order Comment Line record instead of only appending to the JSON array.

Example

[EventSubscriber(ObjectType::Codeunit, Codeunit::SFPBCProdOrderCommentLine14FDW, OnAfterGetProductionOrderComments, '', false, false)]
local procedure AddCustomComment(ProductionOrderNo: Code[20]; var ProdOrderCommentLineArray: JsonArray)
var
    CommentObject: JsonObject;
    CustomCommentLbl: Label 'Comment added by a per-tenant extension.';
begin
    Clear(CommentObject);
    CommentObject.Add('prodOrderNo', ProductionOrderNo);
    CommentObject.Add('lineNo', 0);
    CommentObject.Add('date', Today());
    CommentObject.Add('comment', CustomCommentLbl);
    ProdOrderCommentLineArray.Add(CommentObject);
end;