Quintiq file version 2.0
#parent: #root
Method SetDefaultValue () id:Method_DialogCreateEditUnit_SetDefaultValue
{
  #keys: '[135040.0.213300467]'
  Body:
  [*
    // Set default + init dialog
    dialogInstance := DataHolderDialogData.Data().WrappedInstance();
    
    isNew := isnull( dialogInstance );
    
    candidates  := selectset(  MacroPlan, Unit, unit,
                               isNew 
                               or ( unit <> dialogInstance ) );
    
    if( not isNew )
    {
      CheckboxHasStart.Checked( dialogInstance.StartDate().IsFinite() )
      CheckboxHasEnd.Checked( dialogInstance.EndDate().IsFinite() )
    }
    
    DataHolderParentUnitSelection.Data( &candidates );
  *]
}
