Quintiq file version 2.0
#parent: ListSalesDemand
Response OnClick () id:Response_ListSalesDemand_MenuNewSalesDemand_OnClick
{
  #keys: '[124112.0.98546278]'
  Body:
  [*
    // Create a new sales demand
    dlg := construct( DialogCreateEditSalesDemand );
    salesdemand := dlg.NewSalesDemand( this );
    
    ApplicationLibMacroPlanner.AutoExpandSelection( this, salesdemand );
  *]
  CanBindMultiple: false
  DefinitionID => /ListSalesDemand/Responsedef_ListSalesDemand_Menu_OnClick
  Initiator: 'MenuNewSalesDemand'
  Precondition:
  [*
    return Product_MP::HasProductAndHasPeriod( feedback, MacroPlan )
           and SalesDemandBase::CanCreate( feedback, 
                                           DataHolderChildSalesSegments.Data(), 
                                           DataHolderChildProducts.Data(), 
                                           DataHolderChildStockingPoints.Data() );
  *]
}
