Quintiq file version 2.0
#parent: #root
Method NewPriority (
  internal[GUIComponent] parent
) as Priority id:Method_DialogCreateEditPriority_NewPriority
{
  #keys: '[11660.0.424281454]'
  Body:
  [*
    // New priority
    
    data := MacroPlan.Priority( relshadow, Name := "" );// Set Name to empty, wil be set in Create method
    Dialog.Data( data );
    
    result := Dialog.DoModal( parent );
    newobj := null( Priority );
    
    if( result > 0 )
    {
      newobj := Priority::Create( MacroPlan,
                                  data.Name(),
                                  data.Weight(),
                                  false );
    }
    
    return newobj;
  *]
}
