Managed bins are only allowed for Receipt to Stock type Receipts using a PO

Hello,

Has anyone run into this error before, and how did you manage to fix it if you did?

“Managed bins are only allowed for Receipt to Stock type Receipts using a PO.”

I’m trying to make a hybrid form for both PO and Receipts via a predefined csv file. Mostly working, last hiccup is on the receiving end of things. I traced out the process manually creating a receipt and I am not seeing which method I’m missing. It makes it to the MessageBox.Show(“T6”) without error but on the UpdateMaster it brings up this error:
image

The commented out line doesn’t seem to affect it for me, so I took it back out. Also the “OnChangeDtlBinNum” doesn’t get called when I trace it out but I was getting an error without it. I do have some more code below it, but this seems to be the spot that it hangs. I’m going to run one last trace start to finish on our test instance to make sure I didn’t miss anything in the process. Edit* I did not miss anything in the trace :confused:

Thank you all.

receipts.GetNewRcvDtl(1, "1", packslip);
receipts.GetDtlPOInfo(1, "1", packslip, 0, ponum, false, out msg_postat);
receipts.GetDtlPOLineInfo(1, "1", packslip, 0, Int32.Parse(row.Cells["POLine"].Text), out msg_dtlinfo);
receipts.CheckDtlJobStatus(ponum, Int32.Parse(row.Cells["POLine"].Text), 1, "", out msg_question, out msg_question2, out msg_warning);
receipts.GetDtlPORelInfo(1, "1", packslip, 0, 1);
receipts.OnChangeDtlWareHouseCode(1, "1", packslip, 0, "ARROW", true, out msg_question, out msg_warning); 
receipts.OnChangeDtlBinNum(1, "1", packslip, 0, "ARROW", false, out msg_question);

MessageBox.Show("T5");
if (validateLotTracked(part))
{	
	MessageBox.Show("T5.1.1");
	receipts.CheckDtlLotInfo(1, "1", packslip, 0, proposedLot, out msg_question, out msg_error);
	MessageBox.Show("T5.1.2");
	receipts.GetDtlLotInfo(1, "1", packslip, 0, proposedLot, out msg_question, out msg_error);
}
else
{
	MessageBox.Show("T5.2");
	proposedLot = "";
}


MessageBox.Show("T6");
//receipts.OnChangeDtlReceiptType(1, "1", packslip, 0, "P");
receipts.UpdateMaster(true, true, 1, "1", packslip, 0, out msg_updater, out msg_updater, out msg_updater, out msg_updater, true, out msg_updater, out msg_updater, out msg_updater, out msg_updater, false, out msg_updater, false, out bit_updater, true, out bit_updater, false, row.Cells["PartNum"].Text, proposedLot, true, out msg_updater);
				```

I presume its saying the PORel.TranType (that you are trying to receive against) needs to be Inventory ( Stock (“PUR-STK”) )

I need it to end up PUR-SMI, it’s actually coming from a supplier managed inventory order. The PO side seems to match all fields on historical PO’s for this supplier, so I’m not sure why it’s having issues bringing in the PO information… Maybe I should run some print statements on what the receipt thinks it has for PO information.


Yeah, after testing I believe you are right it is claiming it needs to be PUR-STK. However, when done manually, it comes out as a PUR-SMI as intended. Something in the way I am calling the functions on the receipt adapter isn’t making it flag as a PUR-SMI, but I’ve tested the PO fields being brought in, and it points to the correct PO. I have also done a 1 to 1 comparison of the PO I’m generating earlier compared to a manual entry PO. That leads me to believe it’s something not being called on the Receipt adapter, but I can’t for the life of me figure it out. I even tried setting a bunch of the fields manually after all of the adapter methods to catch anything that wasn’t set, and I still am returning that error.

Aha, I think I may have found something today. I will be back with the hopeful solution. And yes it is related to exactly what you said, because Epicor is doing exactly what it’s supposed to be doing.

I believe there is a method that doesn’t appear in the trace when going through the steps manually. After GetNewRcvDtl, I used OnChangeDtlPOSelected. I mistakenly was thinking the PO was fully being brought in by calling the GetDtlPOInfo, GetDtlPOLineInfo, and GetDtlPORelInfo. Evidently, this OnChangeDtlPOSelected is needed before these to properly set the receipt’s active PO. Even though the information fields come in, it doesn’t know what PO to reference in some of the things such as UpdateMaster from the looks of it. Maybe I’m off on the internal workings, but this was my observed behavior. Because of this, I believe it was defaulting it to a standard PO #0 and thus was no longer thought of as a supplier managed bin location, and resulted in the error we saw.

Thanks for your help Chris! Marking yours as the solution because technically, Epicor was telling me exactly what you were, and it was the problem.

Very generous and probably undeserved but I will take it.

Side note, OnChange methods typically require a rowmod with them as well (and sometimes clear the rowmod after running)

1 Like