Quintiq file version 2.0
#parent: ListScenario
Response OnClick (
  Scenario selection
) id:Response_ListScenario_MenuEdit_OnClick #extension
{
  Precondition:
  [*
    username := ApplicationMacroPlanner.GetUserName();
    return feedback = ''
           and selection.CanEdit( feedback )
           and selection.CanModify( username, feedback );
  *]
  QuillAction #extension
  {
    Body:
    [*
      // Edit scenario
      dlg := construct( DialogCreateEditScenario );
      dlg.dropDownStringListGeneral().Visible( selection.EnableSync() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( selection.EnableSync() );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( selection.EnableSync() );
      
      dlg.EditScenario( selection );
    *]
  }
}
