Quintiq file version 2.0 
 | 
#parent: ListSnapshot 
 | 
Response OnClick ( 
 | 
  LibOpt_SnapshotReplannableCopyDataset selection 
 | 
) id:Response_ListSnapshot_MenuLoadDatasetNewClient_OnClick 
 | 
{ 
 | 
  #keys: '[139544.0.769039779]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Load the dataset that is attached to the replannable snapshot in a new client.  
 | 
    infos := ExternalMDSEditor::Editor().ObjectInfos(); 
 | 
    datasetinfo := infos.Find( selection.DatasetName() );      
 | 
    if( not isnull( datasetinfo ) ) 
 | 
    { 
 | 
      // This method is only intended to be used for development 
 | 
      LibOpt_GlobalState.OpenNewClientWithDatasetLoaded( datasetinfo ); 
 | 
      selection.IsDatasetLoaded( true ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      // The dataset that is attached to the replannable snapshot is already deleted.  
 | 
      // The below method will update all LibOpt_SnapshotReplannableCopyDataset snapshots to prevent further mismatches and show a warning to explain this to the AE.  
 | 
      LibOpt_GlobalState.LoadDatasetSnapshotReplannableAlreadyDeleted( selection ); 
 | 
    } 
 | 
  *] 
 | 
  CanBindMultiple: false 
 | 
  DefinitionID => /ListSnapshot/Responsedef_ListSnapshot_Menu_OnClick 
 | 
  Initiator: 'MenuLoadDatasetNewClient' 
 | 
  Precondition: 
 | 
  [* 
 | 
    return LibOpt_GlobalState.LoadDatasetSnapshotReplannableAllowed( selection, true ); 
 | 
  *] 
 | 
} 
 |