Quintiq file version 2.0 
 | 
#parent: ListScenario 
 | 
Response OnClick ( 
 | 
  structured[Scenario] selection 
 | 
) id:Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick #extension 
 | 
{ 
 | 
  Precondition: 
 | 
  [* 
 | 
    return not isnull( ScenarioManager ) and selection.Element( 0 ).CanCreate( feedback, true ); 
 | 
  *] 
 | 
  QuillAction #extension 
 | 
  { 
 | 
    Body: 
 | 
    [* 
 | 
      // To be derived - ScenarioMP 
 | 
      // Create a new Scenario 
 | 
      dlg := construct( DialogCreateEditScenario ); 
 | 
      dlg.checkboxEnableSync().Visible( true ); 
 | 
      dlg.dropDownStringListGeneral().Visible( true ); 
 | 
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() ); 
 | 
      dlg.checkboxIsKeyProduct().Visible( true ); 
 | 
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( true ); 
 | 
      parent := selection.Element( 0 ).Parent(); 
 | 
      dlg.NewScenario( ScenarioManager, parent, true ); 
 | 
    *] 
 | 
  } 
 | 
} 
 |