| Quintiq file version 2.0 | 
| #parent: MatrixEditorProductPlanning | 
| Response OnClick ( | 
|   structured[ProductInStockingPointInPeriod] selection | 
| ) id:Response_MatrixEditorProductPlanning_MenuLock_OnClick | 
| { | 
|   #keys: '[136682.2.1137897473]' | 
|   CanBindMultiple: false | 
|   DefinitionID => /MatrixEditorProductPlanning/Responsedef_MatrixEditorProductPlanning_WebMenu_OnClick | 
|   Initiator: 'MenuLock' | 
|   Precondition: | 
|   [* | 
|     return ProductInStockingPointInPeriod::CanLockUnlock( selection, feedback ); | 
|   *] | 
|   QuillAction | 
|   { | 
|     Body: | 
|     [* | 
|       // Lock total supply quantity for PISPIPs | 
|       // This is a workaround, we supposedly set the bindingtype of selection as the subtype, but | 
|       // the response would have trouble handling multiple cell selection, so for now, we bind the base type | 
|       // then select the subtype | 
|        | 
|        | 
|       pispipLeafs := selectset( selection,  | 
|                                 Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ),  | 
|                                 pispip,  | 
|                                 true ); | 
|        | 
|       ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, true, true ); | 
|     *] | 
|     GroupServerCalls: false | 
|   } | 
| } |