diff --git a/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRule.Table.al b/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRule.Table.al index bedb88468d..07ce555105 100644 --- a/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRule.Table.al +++ b/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRule.Table.al @@ -70,20 +70,6 @@ table 20404 "Qlty. Inspection Gen. Rule" end else QltyJobQueueManagement.DeleteJobQueueIfNothingElseIsUsingThisGroup(Rec, xRec."Schedule Group"); end; - - trigger OnLookup() - var - QltyJobQueueManagement: Codeunit "Qlty. Job Queue Management"; - begin - QltyJobQueueManagement.CheckIfGenerationRuleCanBeScheduled(Rec); - if GuiAllowed() then - if Rec."Schedule Group" = '' then begin - Rec."Schedule Group" := DefaultScheduleGroupLbl; - Rec.Modify(false); - QltyJobQueueManagement.PromptCreateJobQueueEntryIfMissing(Rec."Schedule Group"); - end else - QltyJobQueueManagement.RunPageLookupJobQueueEntriesForScheduleGroup(Rec."Schedule Group") - end; } field(10; "Template Code"; Code[20]) { @@ -286,7 +272,6 @@ table 20404 "Qlty. Inspection Gen. Rule" var TriggerNotActiveConfirmQst: Label 'You have set an automatic trigger but the inspection generation rule activation is set to "%1". Do you want to update the activation trigger to "%2?"', Comment = '%1=current activation trigger,%2=proposed activation trigger'; RuleCurrentlyDisabledLbl: Label 'The generation rule Sort Order %1, Template Code %2 is currently disabled. It will need to have an activation trigger of "Automatic Only" or "Manual or Automatic" before it will be triggered by "%3"', Comment = '%1=generation rule sort order,%2=generation rule template code,%3=auto trigger'; - DefaultScheduleGroupLbl: Label 'QM', Locked = true; ChooseTemplateFirstErr: Label 'Please choose the template first.'; FilterLengthErr: Label 'This filter is too long and must be less than %1 characters.', Comment = '%1=filter string maximum length'; @@ -328,7 +313,7 @@ table 20404 "Qlty. Inspection Gen. Rule" end; end; - internal procedure HandleOnLookupSourceTable() + internal procedure HandleOnAssistEditSourceTable() var QltyFilterHelpers: Codeunit "Qlty. Filter Helpers"; QltyInspecGenRuleMgmt: Codeunit "Qlty. Inspec. Gen. Rule Mgmt."; diff --git a/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRules.Page.al b/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRules.Page.al index c6f6c12312..27f6fc56e6 100644 --- a/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRules.Page.al +++ b/src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRules.Page.al @@ -57,7 +57,7 @@ page 20405 "Qlty. Inspection Gen. Rules" trigger OnAssistEdit() begin - Rec.HandleOnLookupSourceTable(); + Rec.HandleOnAssistEditSourceTable(); CurrPage.Update(); end; } @@ -72,7 +72,7 @@ page 20405 "Qlty. Inspection Gen. Rules" if Rec.Insert(true) then; Commit(); end; - Rec.HandleOnLookupSourceTable(); + Rec.HandleOnAssistEditSourceTable(); if xRec."Entry No." = Rec."Entry No." then CurrPage.Update(true); end; @@ -148,6 +148,19 @@ page 20405 "Qlty. Inspection Gen. Rules" } field("Schedule Group"; Rec."Schedule Group") { + trigger OnDrillDown() + var + QltyJobQueueManagement: Codeunit "Qlty. Job Queue Management"; + begin + QltyJobQueueManagement.CheckIfGenerationRuleCanBeScheduled(Rec); + if GuiAllowed() then + if Rec."Schedule Group" = '' then begin + Rec."Schedule Group" := DefaultScheduleGroupLbl; + Rec.Modify(false); + QltyJobQueueManagement.PromptCreateJobQueueEntryIfMissing(Rec."Schedule Group"); + end else + QltyJobQueueManagement.RunPageLookupJobQueueEntriesForScheduleGroup(Rec."Schedule Group") + end; } } } @@ -379,6 +392,7 @@ page 20405 "Qlty. Inspection Gen. Rules" RowStyle: Option None,Standard,StandardAccent,Strong,StrongAccent,Attention,AttentionAccent,Favorable,Unfavorable,Ambiguous,Subordinate; GenerationRulesCaptionLbl: Label 'Quality Inspection Generation Rules'; GenerationRulesCaptionForTemplateLbl: Label 'Quality Inspection Generation Rules for %1', Comment = '%1=the template'; + DefaultScheduleGroupLbl: Label 'QM', Locked = true; trigger OnInit() begin