| Quintiq file version 2.0 | 
| #parent: PanelActions/ButtonApply | 
| Response OnClick () id:Response_PanelActions_ButtonApply_OnClick | 
| { | 
|   #keys: '[144528.1.1744494047]' | 
|   CanBindMultiple: false | 
|   DefinitionID: 'Responsedef_WebButton_OnClick' | 
|   Precondition: | 
|   [* | 
|     sanitycheckfeedback := ''; | 
|     gp := guard( MacroPlan.GlobalParameters_MP(), null( GlobalParameters_MP ) ); | 
|     formHasChanges := ApplicationMacroPlanner.CheckFormHasChangesWithFeedback( FormSanityCheckParameters, feedback ); | 
|      | 
|     return not isnull( MacroPlan ) | 
|            and formHasChanges  | 
|            and GlobalParameters_MP::ValidateInput( feedback, | 
|                                                    sanitycheckfeedback, | 
|                                                    MacroPlan, | 
|                                                    MacroPlan.DefaultShiftPattern(), | 
|                                                    gp.DisaggregationRatio(), | 
|                                                    ApplicationMacroPlanner.FormatStringToNumber( EditFieldNumberOfDecimals.Text() ), | 
|                                                    ApplicationMacroPlanner.FormatStringToReal(  EditFieldBalanceTolerance.Text() ), | 
|                                                    ApplicationMacroPlanner.FormatStringToReal( EditFieldLotSizeTolerance.Text() ), | 
|                                                    gp.BottleneckTolerance(), | 
|                                                    gp.BottleneckWindowStart(), | 
|                                                    gp.BottleneckWindowEnd(), | 
|                                                    gp.StartOfKPIHorizon(), | 
|                                                    gp.EndOfKPIHorizon(), | 
|                                                    gp.DefaultSmartPlanStrategy(), | 
|                                                    gp.UnitLowerBottleneckThreshold(), | 
|                                                    gp.UnitUpperBottleneckThreshold(), | 
|                                                    ApplicationMacroPlanner.FormatStringToNumber( EditFieldMaxNumPerGroup.Text() ),   /* For Sanity Check, the rest default to existing GP values */ | 
|                                                    ApplicationMacroPlanner.FormatStringToReal( EditFieldUpperLimit.Text() ), /* For Sanity Check, the rest default to existing GP values */ | 
|                                                    ApplicationMacroPlanner.FormatStringToReal( EditFieldLowerLimit.Text() ), /* For Sanity Check, the rest default to existing GP values */ | 
|                                                    gp.DefaultAllocation(), | 
|                                                    gp.DefaultEfficiency(), | 
|                                                    gp.DefaultMinCapacityPerDayForUnit(), | 
|                                                    gp.DefaultMaxCapacityPerDayForUnit(), | 
|                                                    gp.DefaultMaxLoadPercentage(), | 
|                                                    gp.DefaultMaxCapacityForStockingPoint(), | 
|                                                    gp.DefaultOperationInputOutputQuantity(), | 
|                                                    gp.HasDefaultInventoryHoldingCost(), | 
|                                                    gp.DefaultAccountForInventoryHolding(), | 
|                                                    gp.HasAbsoluteValueForInventoryHolding(), | 
|                                                    gp.DefaultAbsoluteValueForInventoryHolding(), | 
|                                                    gp.DefaultAnnualInterestRateForInventoryHolding(), | 
|                                                    gp.PeriodSpecificationForUnitActual(),  | 
|                                                    gp.DefaultNumberOfPeriodsForAvgDemand(), | 
|                                                    gp.NoiseThresholdOptimizerOutput(), | 
|                                                    gp.NumberOfPeriodsSmartPlan(), | 
|                                                    gp.UseSlidingWindowsApproach(), | 
|                                                    gp.NumberOfPeriodsInWindow(), | 
|                                                    gp.NumberOfPeriodsPerSlide(), | 
|                                                    gp.DefaultServiceLevel(), | 
|                                                    gp.StockingPointBottleneckThreshold()); | 
|   *] | 
|   QuillAction | 
|   { | 
|     Body: | 
|     [* | 
|       // Apply changes | 
|       Form.ApplyChanges(); | 
|     *] | 
|     GroupServerCalls: false | 
|   } | 
| } |