Quintiq file version 2.0
#parent: ListScenario
Response OnClick (
  Scenario selection
) id:Response_ListScenario_MenuScenarioCopy_OnClick
{
  #keys: '[11766.1.296298947]'
  Body:
  [*
    // Create a new Scenario By Copy/duplicate existing scenario
    newscenario := null( Scenario );
    
    if ( selection.istype( ScenarioMP ) )
    {
      dlg := construct( ScenarioManager_DialogCreateEditMPScenario );
      newscenario := dlg.CopyScenario( selection, this );
    
      if( not isnull( newscenario ) )
      {
        ApplicationLibMacroPlanner.AutoExpandSelection( this, newscenario );
      }
    }
  *]
  CanBindMultiple: false
  DefinitionID => /ListScenario/Responsedef_ListScenario_Menu_OnClick
  Initiator: 'MenuScenarioCopy'
  Precondition:
  [*
    return selection.CanCopy( feedback );
  *]
  UserRequiresReadWrite: true
}
