| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetDefaultValue () id:Method_DialogCreateEditTransitionType_SetDefaultValue | 
| { | 
|   #keys: '[127238.0.515909762]' | 
|   Body: | 
|   [* | 
|     // Set the default value for the fields in the dialog | 
|      | 
|     data := Dialog.Data(); | 
|      | 
|     if( isnull( data.WrappedInstance() ) ) | 
|     { | 
|       // Default unit | 
|       owner := TransitionType_MP::GetDefaultOwner( MacroPlan, DataHolderHighlight.Data() ); | 
|       data.Unit( relset, owner ); | 
|       inputtype := TransitionType_MP::GetInputType( Dialog.Data().DefaultMinQuantity(),  | 
|                                                     Dialog.Data().HasInputMaxQuantity(),  | 
|                                                     Dialog.Data().DefaultMinDuration(),  | 
|                                                     Dialog.Data().HasInputMaxDuration() ); | 
|       data.InputType( inputtype ); | 
|                                                                   | 
|       // Default from campaign type | 
|       fromcampaigntype := TransitionType_MP::GetDefaultFromCampaignType( MacroPlan, DataHolderSelectedCampaignTypes.Data(), owner ); | 
|       data.FromCampaignType( relset, fromcampaigntype ); | 
|     } | 
|   *] | 
| } |