Processing Counter Sale Via BPM Code

Hello,

I am attempting to use the “Process Counter Sale Functionality” to automatically create a shipment and invoice, in BPM code. I have followed the trace, and yet the counter sale process does not seem to work. It seems to only create an empty AR group and not even create the shipment.
Business Object: Sales Order
Method: ProcessCounterSale
Versions: 10.2.300 / 10.2.700

There is no exeption thrown, no data in the out variables. I am at a loss, and don’t really want to write all the code to make the shipment and invoice lol! Anyone have this working?

OrderHed CounterSale

headerRecordToUpdate.CounterSale = true;

          headerRecordToUpdate.CreatePackingSlip = true;

          headerRecordToUpdate.CreateInvoice = true;

          soSvc.ChangeCounterSale(ref mySODataSet);

          soSvc.MasterUpdate(false,false,"OrderHed",headerRecordToUpdate.CustNum,headerRecordToUpdate.OrderNum, true, out  param1, out  three, out  four, out  five, out  six, out  seven, out  eight, ref mySODataSet);

          ordernum = headerRecordToUpdate.OrderNum;

OrderDtl CounterSale:

soSvc.OrderDtlGetNewCounterSale(ref mySODataSet, headerRecord.OrderNum);

Processing Counter Sale:

soSvc.ValidateInvQty(ordernum, out opNegInvMessage, out opNegQtyAction, ref mySODataSet);

soSvc.ValidateSNs(ref mySODataSet);

soSvc.CheckCustomerCreditLimit(ordernum, mySODataSet.OrderHed.Select(s => s.CustNum).FirstOrDefault(), out cCreditLimitMessage, out cAgingMessage, out cCreditShipAction, out lContinue, ref mySODataSet);

soSvc.ProcessCounterSale(ordernum, true, true, true, "", out cPackNum, out iInvoiceNum, out opMessage, ref mySODataSet);