Quintiq file version 2.0
|
#parent: ListScenario
|
Response OnClick (
|
structured[Scenario] selection
|
) id:Response_ListScenario_MenuScenarioNewMacroPlan_OnClick #extension
|
{
|
Body:
|
[*
|
// To be derived - ScenarioMP
|
|
// Create a new Scenario
|
dlg := construct( ScenarioManager_DialogCreateEditMPScenario );
|
parent := selection.Element( 0 ).Parent();
|
scenario := dlg.NewScenario( this, ScenarioManager, parent, false );
|
|
if( not isnull( scenario ) )
|
{
|
ApplicationLibMacroPlanner.AutoExpandSelection( this, scenario );
|
// To make sure the active scenario on the supply chain overview panel is updated
|
ApplicationLibMacroPlanner.SelectScenario( scenario, Form );
|
|
// Launch supply chain wizard upon scenario creation
|
if( ScenarioManager.LaunchInitializationWizardAtScenarioCreation() )
|
{
|
ApplicationLibMacroPlanner.LaunchInitializationWizard( MacroPlan );
|
}
|
}
|
*]
|
Precondition:
|
[*
|
return not isnull( ScenarioManager ) and selection.Element( 0 ).CanCreate( feedback, true );
|
*]
|
}
|