Quintiq file version 2.0
#parent: ActionBarGroupSafetyStock/ButtonGenerateSafetyStock
Response OnClick () id:Response_ActionBarGroupSafetyStock_ButtonGenerateSafetyStock_OnClick
{
  #keys: '[136682.2.242017940]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( DataHolderActiveScenario.Data(), feedback ) 
           and ProductInStockingPoint_MP::CanRunGenerateSafetyStocks( feedback, MacroPlan, DataHolderPISP.Data(), false );
  *]
  QuillAction
  {
    Body:
    [*
      // Generate safety stocks for all pispip
      ProductInStockingPoint_MP::GenerateSafetyStocksBaseOnAlgorithm( null( ProductInStockingPoint_MPs ), true, MacroPlan.GlobalParameters_MP() );
      ApplicationMacroPlanner.ButtonGenerateSafetyStock().IsPressed( false );
    *]
    GroupServerCalls: false
  }
}
