Quintiq file version 2.0
#parent: pHeader/bRestore_778
Response OnClick () id:Response_pHeader1_799_bRestore_OnClick_141
{
  #keys: '[413988.0.1654260513]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      currentNOPT := dhNewOfflinePlanTable.Data();
      targetNOPT  := maxselect( MacroPlan, NewOfflinePlanTable, tempNOPT, tempNOPT <> currentNOPT, tempNOPT.SaveDateTime() );
      if ( not isnull( targetNOPT ) ) {
        currentNOPT.Delete();
        dhNewOfflinePlanTable.Data( targetNOPT );
      }
      
      WebMessageBox::Success( Translations::A_VWED_Success() );
    *]
    GroupServerCalls: false
  }
}
