PkgControlIDBuildSplitMerge not executing MoveFromSourcePCIDToDestPCID

We have this code, and it will not execute a move from the sourcePCID MoveQuantity to the Destination PCID. Any idea on what may be wrong here? Thanks.

try
        {

    
          this.CallService<Erp.Contracts.PkgControlIDBuildSplitMergeSvcContract>(pcidBSM =>
          {
            Erp.Tablesets.PCIDBuildSplitMergeSourceTableset sourceTS = new Erp.Tablesets.PCIDBuildSplitMergeSourceTableset();
            Erp.Tablesets.PCIDBuildSplitMergeDestTableset destTS = new Erp.Tablesets.PCIDBuildSplitMergeDestTableset();
          
            pcidBSM.GetSourcePCID(this.PCID, true, ref sourceTS);          
            
            bool partExists = false;
            bool lotExists = false;          
            foreach(var row in sourceTS.PCIDBuildSplitMergeSourceItem.Where(r => r.ItemPartNum == partNum))
            {
              infoMsg("sourceitem: " + row.ItemPartNum + " qtyonhand " + row.ItemQuantity.ToString());
                row.SelectedForAction = true;
                row.MoveQuantity = PartsPerPack;
                row.RowMod = "U";
            }
            
            infoMsg("new pcid: " + newPCID + " binnum: " + sourceTS.PCIDBuildSplitMergeSource[0].BinNum.ToString());
            pcidBSM.GetDestPCID(newPCID, true, ref destTS);
            if (destTS.PCIDBuildSplitMergeDest[0].BinNum == null || destTS.PCIDBuildSplitMergeDest[0].BinNum == string.Empty)
            {
                destTS.PCIDBuildSplitMergeDest[0].BinNum = sourceTS.PCIDBuildSplitMergeSource[0].BinNum;              
            }   
            infoMsg(sourceTS.PCIDBuildSplitMergeSource[0].BinNum);
            
            string pcidNotMovedMessage;
            string serialTrackPartsNotMovedMessage;
            pcidBSM.MoveFromSourcePCIDToDestPCID(ref sourceTS, ref destTS, false, false, out pcidNotMovedMessage, out serialTrackPartsNotMovedMessage);
              
          });
      
        }
        catch(Exception ex)
        {
          infoMsg(ex.ToString());
        }

Probably need to call update after that call.

I don’t see an Update method for PkgControlIDBuildSplitMerge

1 Like

It’s been a while. I have some code I could reference, but I can’t do it right now.

Maybe someone else will come along quicker.

Thank you Kevin. Nancy and I work together and we’ve been stuck on this for almost two weeks now. We’ve exhausted all of the tracing techniques that we are aware of and have multiple people who have sent us their code for comparison. I’m wondering if there is a bug or something with our version (Kinetic 2024.2.7).

Doing a build/split/merge through the UI works just fine, but nothing happens when we fire the same methods that the UI appears to be using. No error message feedback at all, just no movement.

1 Like

After a lot of digging and some help from @hmwillett and @Jason_Woods, we determined that this particular BO/Method will not work if triggered from a Data Directive. Even though the method was being called within a function, the function itself was being triggered by data directives during all of our initial failed tests. We happened to stumble upon this by testing known working code (thank you Hannah) within a method directive (by chance) and seeing it work.

We aren’t entirely sure, but we believe it is caused by this code within the DLL shown below. It lines up with our silent failures rather than actual error messages.

2 Likes