We have always used Rcvinspection in PartPlant, but if your data is in Part then you need these fields in your query.
Set the relation with Company and PartNum
Then bind automatically should map, company, PartNum and RcvInspectionReq.
Just a friendly reminder for your future to-do list. When you upgrade to Kinetic 2023.2 or beyond, this feature has been added to base code. We now support inspection managed at the Part & part/site level. You can choose to Use the the value in the partclass, or you can override it and choose to INSPECT or NOT inspect.
I am doing the exact same thing as the thread, but for some reason, it is not working out. Also doing this on DD In Transaction.
When I go to PO Entry and enter the Part Number, the Inspection Required on PoDetail is not checked still.
Really appreciate any help you can provide. Thank you!
Your query is using your ud field, but your mapping is using Epicor’s fields. I would stick with the builtin field because eventually the DD would no longer be needed.
If we still want to use the ud field (won’t be using the new version for another while), should the mapping of ttPoDetail RcvInspecReq be binded with Part_InspecReqUDfield?
@PhoebeL Well that did not go well. The bpm loaded with an error because of your ud field and even after I swapped out your field for the one from Epicor it would not validate. I got a index was out of bounds.
Here is the code I use to get the RcvInspectionReq. It should work for either field you want to use.
/* Set Rcv Insp Required */
Erp.Tables.Part Part;
foreach (var ttPODetailRow in (from ttPODetail_Row in ttPODetail
where (ttPODetail_Row.Added() || ttPODetail_Row.Updated())
select ttPODetail_Row))
{
bool rcvInsp = (from Part_Row in Db.Part
where ttPODetailRow.Company == Part_Row.Company && ttPODetailRow.PartNum == Part_Row.PartNum
select Part_Row.RcvInspectionReq).FirstOrDefault();
if (rcvInsp != null)
{
if (rcvInsp == true )
{
ttPODetailRow.RcvInspectionReq = true;
}
}
}
lol riip…
Thank you for providing the code, i replaced the Part_Row.RcvInspectionReq with the UD field, but it is still not working on the PO.
Am I dumb or missing something?
The next step will be to see if the code is running and how far it gets. I have starts and stops on most of my routines, so if an error is in the log I know what was running. One before Erp.Tables and one after the last curly brace. I would also add one inside the foreach and in rcvInsp not null and true to see what is happening.
Then in the app server event log you see the messages
Ice.Diagnostics.Log.WriteEntry($"Start Set Rcv Insp");