Firstly, thank you for your response!
Sure, what brought this up is when we receive parts, the system throws it into the company default bin until the warehouse employee hits “Set to Location” button and it wipes the bin number away and then throws an error. I was on here looking for others with a similar issue and saw somebody had written a BPM on the BO.
this link details what I was reading and formed my thought process. I’m getting a bunch of complaints from warehouse management and the warehouse team that they don’t have the bins memorized and they want the system to populate this value automatically. I’m having the same issue except with the PUR-STK items.
My code :
BO: Erp.BO.Receipt.AutoSetToLocationToDflt
Post-Processing
var RcptHead = ds.RcvHead.Where(x => x.Company == Session.CompanyID).FirstOrDefault();
if (RcptHead != null)
{
var RcvLines = ds.RcvDtl.Where(dtl => dtl.PONum == RcptHead.PONum && dtl.Company == Session.CompanyID).AsEnumerable();
if (RcvLines != null)
{
foreach (var dtl in RcvLines)
{
if (dtl.TranType == "PUR-STK")
{
var Bin = this.Db.PartBinInfo.Where(pt => pt.PartNum == dtl.PartNum && pt.WarehouseCode == dtl.WareHouseCode).FirstOrDefault();
//dtl.BinNum = Bin.BinNum;
var view = DataView["Mass Receipts"];
}
}
this.Db.Validate();
this.Db.SaveChanges();
}
}

Before ‘Set All To Location’
After ‘Set All To Location’

Part Bin Information that I would like to see populated in the field.
I have all the information stored on the Bin information tab within the part record. I pull that data at the Bin variable and attempt to set it to the view as this is event doesn’t submit the values rather validates.
With that being what I’m trying to accomplish, I don’t think setting the BinNum through the RcvDtl.BinNum won’t work as it isn’t submitting the data, correct? it’s wiping the value and throwing an error that there must be a value. I found through a post where Jose was setting fields using the oTran object but I get a reference error everytime I try to utilize that object. Maybe this isn’t the best way to go about it but I wanted to default an option but also give them the choice to change it if they can’t fit it properly in the bin or if it’s a one-off case. In Jose’s post, he was using oTran to pull in the DataView and programmatically apply values.
(one source used)
We are fairly new to Epicor and I’m still trying to find my footing in the platform, is oTran something that’s only available to on-prem customers? Is that equivalent to our Session variable?

