How to Create a new Inventory Transfer using BPM

Hi, so I have a custom UD Form. this Custom UD Form will be Automated in the Inventory Transfer Process. But I wonder what the BO Method Should I call. I already tried to create the BPM but it always has this error “Non-static method requires a target”. This is my code I’m tried to Hardcode my data first.

foreach(var ud102 in ds.UD102)
{
  try
  {
  using(var invTransSvc = Ice.Assemblies.ServiceRenderer.GetService<InvTransferSvcContract>(Db))
  {
    bool preCommitSuccess = true;
    string legalNumberMessage = "";
    string partTranPks = "";
    InvTransferTableset invTransfer = new InvTransferTableset();
    //invTransSvc.GetTransferRecord(" PTH0006", Guid.NewGuid(), "", "Kg", out preCommitSuccess, ref invTransfer);  
    invTransSvc.GetNewInventoryTransfer("STK-STK",ref invTransfer);
    invTransfer.InvTrans[0].PartNum = " PTH0006";
    invTransfer.InvTrans[0].TransferQty = 1;
    invTransfer.InvTrans[0].TrackingQty = 1;
    invTransfer.InvTrans[0].TranDate = DateTime.Now;
    invTransfer.InvTrans[0].TrackingUOM = "Kg";
    invTransfer.InvTrans[0].FromPlant = "KACS";
    invTransfer.InvTrans[0].Plant = "KACS";
      
    invTransfer.InvTrans[0].Plant2 = "KACS";
    invTransfer.InvTrans[0].ToPlant = "KACS";
    invTransfer.InvTrans[0].TransferQtyUOM = "Kg";
    invTransfer.InvTrans[0].FromWarehouseCode = "LOAD";
    invTransfer.InvTrans[0].ToWarehouseCode = "LOAD";
    invTransfer.InvTrans[0].FromBinNum = "LD01";
    invTransfer.InvTrans[0].ToBinNum = "LD01";
    invTransfer.InvTrans[0].FromLotNumber = ".0131";
    invTransfer.InvTrans[0].ToLotNumber = ".0132";
    invTransSvc.PreCommitTransfer(ref invTransfer, out preCommitSuccess);
    invTransSvc.CommitTransferAndUpdateHistory(ref invTransfer, out legalNumberMessage);
    
  }
  }
  catch(Exception e)
  {
    if(e.InnerException != null)
    {
    
      callContextBpmData.Character01 = e.Message + " Inner : " + e.InnerException.Message; 
    }
    else
    {
       callContextBpmData.Character01 = e.Message;
    }
  }
  
}

There are a lot more methods that are called in that transaction that you are skipping. There’s one for change to bin, change from bin, change part number, change to whse etc.

Do a trace, from when you load the part number, to when you hit the transfer button and make all of the those calls and it can work. (I have done it). Use the business objects to make sure that get it right.

Hi @Banderson, I just know that in the Kinetic version the Trace log is not working. That’s why I don’t get any information from the log. I’m switching to my Classic version and now I get some information from the log

Hi @Banderson, I’m unable to create Inventory Transfer using the Classic menu. Can I get your Log for the Inventory Transfer? or maybe can you tell me the call when we press the Transfer Button. I don’t know why when I tried pressing the Transfer Button it always ran the Kinetic Version. Thanks