Have any of you had success storing WIP in inventory in epicor? When we make parts, for whatever reason, a part will sometimes not make it through the entire process. This part can then sit in inventory for an extended period of time until another job is assigned to it. Here is the current process I am trying to develop, what are your thoughts?
(1) “Move WIP” form is used to move WIP from the job operation to inventory.
(2) When the job is closed, a customization is used to check to see if there is any WIP in storage for that job.
(3) If there is WIP in storage, then it changes the Job# to ‘WIP’
*This is a dummy job# to store all PartWip that is in inventory where the original Job has been closed.
(4) When a new job is created, then the WIP is issued to the new Job# (via another custom form).
Do you guys see any concerns with this? will this affect finance at all? Have any of you worked with PartWipSearchAdapters? I am having issues with my code. Let me know!
This is the root of my issue… I cannot get this code to update the PartWip table. It is not finding any records when using the GetByID method. I know the dataset is being generated, and records are being stored, but when I try to point to the record I want updated, it cannot find it. What do I need to use in the GetByID to point it to the correct record? Here is my code:
EpiTextBox job = (EpiTextBox)csm.GetNativeControlReference("712fe815-dbeb-499d-af5d-746c3bcfc884");
try
{
PartWipSearchAdapter adapterPartWipSearch = new PartWipSearchAdapter(this.oTrans);
adapterPartWipSearch.BOConnect();
string whereClause = "JobNum = '" + Convert.ToString(job.Text) + "' and WareHouseCode = 'VLM'";
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.NamedSearch.WhereClauses.Add("PartWip",whereClause);
bool morePages = false;
PartWipSearchDataSet drt = (PartWipSearchDataSet)adapterPartWipSearch.GetRows(opts,out morePages);
foreach(DataRow dr in drt.PartWip.Rows)
{
string plant = Convert.ToString(dr["Plant"]);
string part = Convert.ToString(dr["PartNum"]);
string job2 = Convert.ToString(dr["JobNum"]);
int ass = Convert.ToInt32(dr["AssemblySeq"]);
int op = Convert.ToInt32(dr["OprSeq"]);
string whs = Convert.ToString(dr["WareHouseCode"]);
string bin = Convert.ToString(dr["BinNum"]);
string lot = Convert.ToString(dr["LotNum"]);
string dim = Convert.ToString(dr["DimCode"]);
string track = Convert.ToString(dr["TrackType"]);
int mtl = Convert.ToInt32(dr["MtlSeq"]);
System.Guid guidID = new Guid(Convert.ToString(dr["SysRowID"]));
bool result = adapterPartWipSearch.GetByID(guidID);
//adapterPartWipSearch.GetByID(plant,part,job2,ass,op,whs,bin,lot,dim,track,mtl,sys);
DataRow drp = adapterPartWipSearch.PartWipSearchData.PartWip[0];
drp.BeginEdit();
drp["JobNum"] = "WIP";
drp["LastActivityDate"] = DateTime.Now;
drp.EndEdit();
adapterPartWipSearch.Update();
}
adapterPartWipSearch.Dispose();
MessageBox.Show("WIP has been moved. To finish closing the job, make sure to save!");
} catch (System.Exception ex)
{
ExceptionBox.Show(ex);
}
Yeah, that still doesn’t work. I have tried using multiple variables in GetByID, and it seems to only want one. Kinda dumb because if you test it using the BL Test tool, it asks for all the variables above