Quintiq file version 2.0
#parent: #root
Method New (
  ScenarioManager owner,
  FormOptimizerStrategiesSlideIn formOptimizerStrategiesSlideIn
) id:Method_DialogCreateEditStrategy_New
{
  #keys: '[139394.0.442640988]'
  Body:
  [*
    // Creates a new strategy
    
    data := owner.Strategy( relshadow,
                            Name := Strategy::GetUniqueStrategyName( Translations::MP_GlobalParameters_DefaultStrategyName(), ScenarioManager ) );
    
    traverse( ScenarioManager, KPI, kpi )
    {
      data.KPIWeight( relnew,
                      KPIName := kpi.Name(),
                      StrategyName := data.Name(),
                      Level := 0,
                      KPI := kpi );
    }
    
    DataHolderForm.Data( formOptimizerStrategiesSlideIn );
    DataHolderDialogData.Data( &data );
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
