| Quintiq file version 2.0 | 
| #parent: #root | 
| MethodOverride SetUnavailable ( | 
|   String usergroups | 
| ) | 
| { | 
|   Description: 'Set scenario to unavailable for usage, argument usergroups to be used in the overloaded method for ScenarioFolder' | 
|   TextBody: | 
|   [* | 
|     if( not this.IsMemoryOnlyStorage() ) | 
|     { | 
|       editor := MDSEditor::Editor(); | 
|       allinfo := editor.ObjectInfos(); | 
|      | 
|       mdsInfo := select( allinfo, Elements, oinfo, oinfo.MDSID().MDSKey() = this.DatasetMDSID() ); | 
|      | 
|       if( not isnull( mdsInfo ) and mdsInfo.IsLoaded() ) | 
|       { | 
|         editor.UnloadMDS( mdsInfo.MDSID() ); | 
|         this.SetScenarioLoadedStatus( false, this.IsLoadingInProgress() ); | 
|       } | 
|     } | 
|      | 
|     //Additional logic is specified in derived class | 
|   *] | 
| } |