@@ -191,9 +191,53 @@ page 20405 "Qlty. Inspection Gen. Rules"
191191 actionref ( CreateNewGenerationRuleForProdWizard_Promoted; CreateNewGenerationRuleForProdWizard)
192192 {
193193 }
194+ actionref ( CreateNewGenerationRuleForAsmWizard_Promoted; CreateNewGenerationRuleForAsmWizard)
195+ {
196+ }
194197 }
195198 area ( Processing)
196199 {
200+ action ( CreateNewGenerationRuleForAsmWizard)
201+ {
202+ Caption = ' Create Assembly Rule' ;
203+ ToolTip = ' Specifies to create a rule for assembly.' ;
204+ Image = Receipt;
205+ ApplicationArea = Assembly ;
206+
207+ trigger OnAction()
208+ var
209+ NewQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule";
210+ RecQltyAsmGenRuleWizard: Page "Qlty. Asm. Gen. Rule Wizard";
211+ begin
212+ NewQltyInspectionGenRule. CopyFilters( Rec) ;
213+ RecQltyAsmGenRuleWizard. RunModalWithGenerationRule( NewQltyInspectionGenRule) ;
214+ CurrPage. Update( false) ;
215+ end ;
216+ }
217+ action ( EditGenerationRuleForAsmWizard)
218+ {
219+ ApplicationArea = Assembly ;
220+ Caption = ' Edit Assembly Rule' ;
221+ ToolTip = ' Edit a Rule for assembly.' ;
222+ Image = Receipt;
223+ Scope = Repeater ;
224+ Visible = ShowEditWizardAssemblyRule;
225+
226+ trigger OnAction()
227+ var
228+ QltyAsmGenRuleWizard: Page "Qlty. Asm. Gen. Rule Wizard";
229+ PreviousEntryNo: Integer ;
230+ begin
231+ PreviousEntryNo := Rec. "Entry No.";
232+ QltyAsmGenRuleWizard. RunModalWithGenerationRule( Rec) ;
233+
234+ CurrPage. Update( false) ;
235+ Rec. Reset() ;
236+ Rec. SetRange( "Entry No.", PreviousEntryNo) ;
237+ if Rec. FindSet() then ;
238+ Rec. SetRange( "Entry No.") ;
239+ end ;
240+ }
197241 action ( CreateNewGenerationRuleForProdWizard)
198242 {
199243 Caption = ' Create Production Rule' ;
@@ -203,9 +247,11 @@ page 20405 "Qlty. Inspection Gen. Rules"
203247
204248 trigger OnAction()
205249 var
250+ NewQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule";
206251 RecQltyProdGenRuleWizard: Page "Qlty. Prod. Gen. Rule Wizard";
207252 begin
208- RecQltyProdGenRuleWizard. RunModalWithGenerationRule( Rec) ;
253+ NewQltyInspectionGenRule. CopyFilters( Rec) ;
254+ RecQltyProdGenRuleWizard. RunModalWithGenerationRule( NewQltyInspectionGenRule) ;
209255 CurrPage. Update( false) ;
210256 end ;
211257 }
@@ -242,9 +288,11 @@ page 20405 "Qlty. Inspection Gen. Rules"
242288
243289 trigger OnAction()
244290 var
291+ NewQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule";
245292 QltyRecGenRuleWizard: Page "Qlty. Rec. Gen. Rule Wizard";
246293 begin
247- QltyRecGenRuleWizard. RunModalWithGenerationRule( Rec) ;
294+ NewQltyInspectionGenRule. CopyFilters( Rec) ;
295+ QltyRecGenRuleWizard. RunModalWithGenerationRule( NewQltyInspectionGenRule) ;
248296 CurrPage. Update( false) ;
249297 end ;
250298 }
@@ -281,9 +329,11 @@ page 20405 "Qlty. Inspection Gen. Rules"
281329
282330 trigger OnAction()
283331 var
284- RecQltyWhseGenRuleWizard: Page "Qlty. Whse. Gen. Rule Wizard";
332+ NewQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule";
333+ QltyWhseGenRuleWizard: Page "Qlty. Whse. Gen. Rule Wizard";
285334 begin
286- RecQltyWhseGenRuleWizard. RunModalWithGenerationRule( Rec) ;
335+ NewQltyInspectionGenRule. CopyFilters( Rec) ;
336+ QltyWhseGenRuleWizard. RunModalWithGenerationRule( NewQltyInspectionGenRule) ;
287337 CurrPage. Update( false) ;
288338 end ;
289339 }
@@ -365,6 +415,7 @@ page 20405 "Qlty. Inspection Gen. Rules"
365415 ShowEditWizardMovementRule: Boolean ;
366416 ShowEditWizardReceivingRule: Boolean ;
367417 ShowEditWizardProductionRule: Boolean ;
418+ ShowEditWizardAssemblyRule: Boolean ;
368419 TemplateCode: Code [20 ];
369420 ShowAssemblyTrigger: Boolean ;
370421 ShowProductionTrigger: Boolean ;
@@ -459,6 +510,7 @@ page 20405 "Qlty. Inspection Gen. Rules"
459510 ShowEditWizardProductionRule := true;
460511 ShowEditWizardReceivingRule := true;
461512 ShowEditWizardMovementRule := true;
513+ ShowEditWizardAssemblyRule := true;
462514 EditAssemblyTrigger := true;
463515 EditProductionTrigger := true;
464516 EditPurchaseTrigger := true;
@@ -480,7 +532,7 @@ page 20405 "Qlty. Inspection Gen. Rules"
480532 case KnownOrInferredIntent of
481533 Rec. Intent::Assembly :
482534 begin
483- ShowEditWizardProductionRule := true;
535+ ShowEditWizardAssemblyRule := true;
484536 EditAssemblyTrigger := true;
485537 AssemblyStyle := Format( RowStyle::Standard) ;
486538 end ;
@@ -527,6 +579,7 @@ page 20405 "Qlty. Inspection Gen. Rules"
527579 begin
528580 ShowEditWizardReceivingRule := false;
529581 ShowEditWizardProductionRule := false;
582+ ShowEditWizardAssemblyRule := false;
530583 ShowEditWizardMovementRule := false;
531584 EditProductionTrigger := false;
532585 EditAssemblyTrigger := false;
0 commit comments