diff --git a/src/Apps/W1/Quality Management/app/src/Workflow/QltyWorkflowRespOptions.PageExt.al b/src/Apps/W1/Quality Management/app/src/Workflow/QltyWorkflowRespOptions.PageExt.al index e28c9d5e0b..ef63e72203 100644 --- a/src/Apps/W1/Quality Management/app/src/Workflow/QltyWorkflowRespOptions.PageExt.al +++ b/src/Apps/W1/Quality Management/app/src/Workflow/QltyWorkflowRespOptions.PageExt.al @@ -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"; @@ -423,7 +423,10 @@ pageextension 20403 "Qlty. Workflow Resp. Options" extends "Workflow Response Op Rec, QltyWorkflowResponse.GetWellKnownKeyBin(), QltyBinCode); + Text := QltyBinCode; + exit(true); end; + exit(false); end; trigger OnValidate() @@ -431,10 +434,9 @@ pageextension 20403 "Qlty. Workflow Resp. Options" extends "Workflow Response Op 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;