| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod LinkOperation ( | 
|   OperationOutput sourceoperationoutput, | 
|   OperationInputGroup destinationoperationinputgroup, | 
|   output OperationLinks trash | 
| ) as OperationLink | 
| { | 
|   Description: 'Add given operations as souce operation.' | 
|   TextBody: | 
|   [* | 
|     // DWE2 Feb-1-2016 (created) | 
|      | 
|     sourcegroupid := sourceoperationoutput.OperationLinkGroupID(); | 
|     destinationgroupid := destinationoperationinputgroup.InputGroupID(); | 
|     defaultqty := sourceoperationoutput.MacroPlan().GlobalParameters_MP().DefaultOperationInputOutputQuantity(); | 
|      | 
|     ol := OperationLink::CreateOrDelete( sourceoperationoutput.Operation(), | 
|                                          destinationoperationinputgroup.Operation(), | 
|                                          trash, | 
|                                          sourcegroupid, | 
|                                          destinationgroupid, | 
|                                          sourceoperationoutput.Quantity(), // Source quantity | 
|                                          false, | 
|                                          defaultqty, // destination quantity | 
|                                          defaultqty, // destiantion min quantity | 
|                                          defaultqty, // destination max quantity | 
|                                          destinationoperationinputgroup.InputGroupQuantity() ); // destination group quantity | 
|      | 
|     return ol; | 
|   *] | 
| } |