Quintiq file version 2.0
#parent: ListUnitCapacity
Response OnClick () id:Response_ListUnitCapacity_MenuNewUnitCapacity_OnClick
{
  #keys: '[105706.0.672869579]'
  Body:
  [*
    // Create a new unit capacity.
    
    dlg := construct( DialogCreateEditUnitCapacity );
    uc := dlg.NewUnitCapacity( this );
    
    ApplicationLibMacroPlanner.AutoExpandSelection( this, uc );
  *]
  CanBindMultiple: false
  DefinitionID => /ListUnitCapacity/Responsedef_ListUnitCapacity_Menu_OnClick
  Initiator: 'MenuNewUnitCapacity'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback )
           and UnitCapacity::CanCreate( MacroPlan, feedback )
           and PeriodSpecification_MP::HasPeriodSpecification( MacroPlan, feedback )
           and Period_MP::HasPeriod( feedback, MacroPlan )
           and UnitCapacity::CanCreate( feedback, DataHolderChildUnits.Data() );
  *]
  UserRequiresReadWrite: true
}
