Quintiq file version 2.0
#parent: #root
Method CopyScenario (
  ScenarioMP source
) id:Method_DialogCreateEditScenario_CopyScenario #extension
{
  Body:
  [*
    // Copy scenario
    scenario := ScenarioManager.ScenarioNode( relshadow,
                                              ScenarioMP,
                                              Parent := source,
                                              Name := ScenarioManager.GetUniqueScenarioName( source.Name() ),
                                              SelectedStrategy := source.SelectedStrategy(),
                                              State := source.State() );
    
    DataHolderActionCopy.Data( true );
    DataHolderDialogData.Data( &scenario );
    
    // do not distribute
    DataHolderDialogData.Data().EnableSync( false );
    checkboxEnableSync.Visible( false );
    dropDownStringListGeneral.Visible( false );
    checkboxIsKeyProduct.Visible( false );
    checkboxCreatePurchaseSupplyProduct.Visible( false );
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
