| Quintiq file version 2.0 | 
| #parent: #root | 
| Method ChangeOwner ( | 
|   Product_MP selectionProduct, | 
|   StockingPoint_MP selectionSP | 
| ) id:Method_DialogCreateEditInventoryCost_ChangeOwner | 
| { | 
|   #keys: '[145730.1.250668143]' | 
|   Body: | 
|   [* | 
|     // Owner changes is only allowed for single create/edit | 
|     // No relshadow needed since the owner is only sourced from dataholder | 
|     if( DataHolderPISPs.Data().Size() <= 1 ) | 
|     { | 
|       // Find the new PISP from nav panel selection, populate new PISP into DH | 
|       newpisp := selectset( DataHolderPISP.Data(), Elements, pisp, pisp.Product_MP() = selectionProduct, | 
|                                                                                pisp.StockingPoint_MP() = selectionSP ) | 
|       DataHolderPISPs.Data( &newpisp ); | 
|     } | 
|     // Update cost label after owner changes | 
|     this.SetCostLabel( DropDownStringListCostDriver.Text() ); | 
|   *] | 
| } |