@@ -179,9 +179,29 @@ page 20405 "Qlty. In. Test Generat. Rules"
179179 actionref ( CreateNewGenerationRuleForProdWizard_Promoted; CreateNewGenerationRuleForProdWizard)
180180 {
181181 }
182+ actionref ( CreateNewGenerationRuleForAsmWizard_Promoted; CreateNewGenerationRuleForAsmWizard)
183+ {
184+ }
182185 }
183186 area ( Processing)
184187 {
188+ action ( CreateNewGenerationRuleForAsmWizard)
189+ {
190+ Caption = ' Create Assembly Rule' ;
191+ ToolTip = ' Specifies to create a rule for assembly.' ;
192+ Image = Receipt;
193+ ApplicationArea = Assembly ;
194+
195+ trigger OnAction()
196+ var
197+ NewQltyInTestGenerationRule: Record "Qlty. In. Test Generation Rule";
198+ RecQltyAsmGenRuleWizard: Page "Qlty. Asm. Gen. Rule Wizard";
199+ begin
200+ NewQltyInTestGenerationRule. CopyFilters( Rec) ;
201+ RecQltyAsmGenRuleWizard. RunModalWithGenerationRule( NewQltyInTestGenerationRule) ;
202+ CurrPage. Update( false) ;
203+ end ;
204+ }
185205 action ( CreateNewGenerationRuleForProdWizard)
186206 {
187207 Caption = ' Create Production Rule' ;
@@ -191,9 +211,11 @@ page 20405 "Qlty. In. Test Generat. Rules"
191211
192212 trigger OnAction()
193213 var
214+ NewQltyInTestGenerationRule: Record "Qlty. In. Test Generation Rule";
194215 RecQltyProdGenRuleWizard: Page "Qlty. Prod. Gen. Rule Wizard";
195216 begin
196- RecQltyProdGenRuleWizard. RunModalWithGenerationRule( Rec) ;
217+ NewQltyInTestGenerationRule. CopyFilters( Rec) ;
218+ RecQltyProdGenRuleWizard. RunModalWithGenerationRule( NewQltyInTestGenerationRule) ;
197219 CurrPage. Update( false) ;
198220 end ;
199221 }
@@ -221,6 +243,30 @@ page 20405 "Qlty. In. Test Generat. Rules"
221243 Rec. SetRange( "Entry No.") ;
222244 end ;
223245 }
246+ action ( EditGenerationRuleForAsmWizard)
247+ {
248+ ApplicationArea = Assembly ;
249+ Caption = ' Edit Assembly Rule' ;
250+ ToolTip = ' Edit a Rule for assembly.' ;
251+ Image = Receipt;
252+ Scope = Repeater ;
253+ Visible = ShowEditWizardAssemblyRule;
254+
255+ trigger OnAction()
256+ var
257+ QltyAsmGenRuleWizard: Page "Qlty. Asm. Gen. Rule Wizard";
258+ PreviousEntryNo: Integer ;
259+ begin
260+ PreviousEntryNo := Rec. "Entry No.";
261+ QltyAsmGenRuleWizard. RunModalWithGenerationRule( Rec) ;
262+
263+ CurrPage. Update( false) ;
264+ Rec. Reset() ;
265+ Rec. SetRange( "Entry No.", PreviousEntryNo) ;
266+ if Rec. FindSet() then ;
267+ Rec. SetRange( "Entry No.") ;
268+ end ;
269+ }
224270 action ( CreateNewGenerationRuleForRecWizard)
225271 {
226272 Caption = ' Create Receiving Rule' ;
@@ -230,9 +276,11 @@ page 20405 "Qlty. In. Test Generat. Rules"
230276
231277 trigger OnAction()
232278 var
279+ NewQltyInTestGenerationRule: Record "Qlty. In. Test Generation Rule";
233280 QltyRecGenRuleWizard: Page "Qlty. Rec. Gen. Rule Wizard";
234281 begin
235- QltyRecGenRuleWizard. RunModalWithGenerationRule( Rec) ;
282+ NewQltyInTestGenerationRule. CopyFilters( Rec) ;
283+ QltyRecGenRuleWizard. RunModalWithGenerationRule( NewQltyInTestGenerationRule) ;
236284 CurrPage. Update( false) ;
237285 end ;
238286 }
@@ -271,6 +319,7 @@ page 20405 "Qlty. In. Test Generat. Rules"
271319 var
272320 RecQltyWhseGenRuleWizard: Page "Qlty. Whse. Gen. Rule Wizard";
273321 begin
322+ Rec. Init() ;
274323 RecQltyWhseGenRuleWizard. RunModalWithGenerationRule( Rec) ;
275324 CurrPage. Update( false) ;
276325 end ;
@@ -360,6 +409,7 @@ page 20405 "Qlty. In. Test Generat. Rules"
360409 ShowEditWizardMovementRule: Boolean ;
361410 ShowEditWizardReceivingRule: Boolean ;
362411 ShowEditWizardProductionRule: Boolean ;
412+ ShowEditWizardAssemblyRule: Boolean ;
363413 TemplateCode: Code [20 ];
364414 ShowAssemblyTrigger: Boolean ;
365415 ShowProductionTrigger: Boolean ;
@@ -453,6 +503,7 @@ page 20405 "Qlty. In. Test Generat. Rules"
453503 ShowEditWizardProductionRule := true;
454504 ShowEditWizardReceivingRule := true;
455505 ShowEditWizardMovementRule := true;
506+ ShowEditWizardAssemblyRule := true;
456507 EditAssemblyTrigger := true;
457508 EditProductionTrigger := true;
458509 EditPurchaseTrigger := true;
@@ -474,7 +525,7 @@ page 20405 "Qlty. In. Test Generat. Rules"
474525 case KnownOrInferredIntent of
475526 Rec. Intent::Assembly :
476527 begin
477- ShowEditWizardProductionRule := true;
528+ ShowEditWizardAssemblyRule := true;
478529 EditAssemblyTrigger := true;
479530 AssemblyStyle := Format( RowStyle::Standard) ;
480531 end ;
@@ -521,6 +572,7 @@ page 20405 "Qlty. In. Test Generat. Rules"
521572 begin
522573 ShowEditWizardReceivingRule := false;
523574 ShowEditWizardProductionRule := false;
575+ ShowEditWizardAssemblyRule := false;
524576 ShowEditWizardMovementRule := false;
525577 EditProductionTrigger := false;
526578 EditAssemblyTrigger := false;
0 commit comments