Quintiq file version 2.0
#parent: #root
Method NeedScenarioNode () as Boolean id:Method_FormScenarioManager_NeedScenarioNode
{
  #keys: '[136682.0.1808754411]'
  Body:
  [*
    // populate ONLINE datasets which are not created as scenario
    scenarioManager := ScenarioManager;
    
    editor   := ExternalMDSEditor::Editor();
    allLoadedObjectInfos := editor.LoadedObjectInfos( 'MacroPlan' );
    
    loadedObjectInfosWithoutScenario := selectset( allLoadedObjectInfos, Elements, objectInfo,
                                                   not exists( scenarioManager, ScenarioNode.astype( Scenario ), scenario,
                                                   scenario.DatasetMDSID() = objectInfo.MDSID().MDSKey() )
                                                  );
    
    return loadedObjectInfosWithoutScenario.Size() > 0;
  *]
  ReturnsOwning: true
}
