Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod LinkOperation ( 
 | 
  Operation sourceoperation, 
 | 
  Operation destinationoperation, 
 | 
  output OperationLinks trash 
 | 
) as OperationLink 
 | 
{ 
 | 
  Description: 'Create operation link between source operation to destiantion operation.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // DWE2 Feb-1-2016 (created) 
 | 
     
 | 
    defaultqty := sourceoperation.MacroPlan().GlobalParameters_MP().DefaultOperationInputOutputQuantity(); 
 | 
     
 | 
    sourcegroupid := BaseOperationLink::GetGroupID( sourceoperation, false, true ); 
 | 
     
 | 
    // We only assign to the same input group if the source and destination have the same uom 
 | 
    destinationgroupid := OperationLink::GetDestinationGroupID( sourceoperation, destinationoperation ); 
 | 
     
 | 
    ol := OperationLink::CreateOrDelete( sourceoperation, 
 | 
                                         destinationoperation, 
 | 
                                         trash, 
 | 
                                         sourcegroupid, 
 | 
                                         destinationgroupid, 
 | 
                                         defaultqty,   // Source quantity 
 | 
                                         false,        // destination has user quantity 
 | 
                                         defaultqty,   // destination quantity 
 | 
                                         defaultqty,   // destiantion min quantity 
 | 
                                         defaultqty,   // destination max quantity 
 | 
                                         defaultqty ); // destination group quantity 
 | 
     
 | 
    return ol; 
 | 
  *] 
 | 
} 
 |