Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ pageextension 20403 "Qlty. Workflow Resp. Options" extends "Workflow Response Op
ToolTip = 'Specifies the destination bin to use.';
ShowMandatory = true;
Enabled = QltyShowBinCode;
AssistEdit = true;
Lookup = true;

trigger OnAssistEdit()
trigger OnLookup(var Text: Text): Boolean
var
Bin: Record Bin;
QltyWorkflowResponse: Codeunit "Qlty. Workflow Response";
Expand All @@ -423,18 +423,20 @@ pageextension 20403 "Qlty. Workflow Resp. Options" extends "Workflow Response Op
Rec,
QltyWorkflowResponse.GetWellKnownKeyBin(),
QltyBinCode);
Text := QltyBinCode;
exit(true);
end;
exit(false);
end;

trigger OnValidate()
var
Bin: Record Bin;
QltyWorkflowResponse: Codeunit "Qlty. Workflow Response";
begin
// After the table relation is removed to change from a drop-down to an assist-edit
// to allow the bins to be filtered by the location code, there needs to be an ability
// to validate the bin is still valid. We do this by fetching the record and
// letting it fail if it doesn't exist.
// There is no table relation on this field because the bins need to be filtered
// by the selected location code via the OnLookup trigger. We validate the bin
// by fetching the record and letting it fail if it doesn't exist.
Bin.Get(QltyLocationCode, QltyBinCode);
QltyWorkflowResponse.SetStepConfigurationValue(Rec, QltyWorkflowResponse.GetWellKnownKeyBin(), QltyBinCode);
end;
Expand Down
Loading