| Quintiq file version 2.0 | 
| #parent: #root | 
| Method CreateExportObject () id:Method_DialogExportPlannedOrder_CreateExportObject | 
| { | 
|   #keys: '[145730.0.1364781769]' | 
|   Body: | 
|   [* | 
|     // Set object based on selection in dialog, if object null, create new ExportPlannedOrder object | 
|     exportMode :=  Form.radiobuttonExportPlannedOrder().BoundValue(); | 
|     isDEF := exportMode = MPSyncUtility::ID_Source_DEF(); | 
|      | 
|     isNewSet := ifexpr( isDEF, | 
|                         CheckboxNewSet.Checked(), | 
|                         false ) | 
|      | 
|     defName := ifexpr( not isNewSet, | 
|                        guard(DropDownListExistingSet.Data().Name(), ''), | 
|                        EditFieldNewSet.Text() ) | 
|      | 
|     exportObj := ExportPlannedOrder::FindCreate( MPSync, | 
|                                                  ApplicationScope.UserName(), | 
|                                                  defName, | 
|                                                  exportMode, | 
|                                                  isNewSet, | 
|                                                  guard( MacroPlan.MDSMacroPlan().Name(), '' ) ); | 
|      | 
|     // Set export object into application dataholder (so that labels that depend on the dataholders are notified) | 
|     ApplicationMacroPlanner.LibSOPImpExp_DataHolderExportBase().Data( exportObj ); | 
|   *] | 
| } |