Hello experts!
I have created 2 (nearly identical) UD checkboxes for Dangerous Goods.
The first one is in Part, the Second is in PO Entry.
The goal is to check it off in Part Entry (If necessary) and have it display checked (if True) in PO Entry, Line Details.
I am not too techy in this and was hoping someone could assist in the how to do this. I am thinking that it should be done in Application Studio, but not sure how or even where to start.
Part Entry-
DB Field= Part_UD.ChkboxDGoods_c
EpiBinding= Part.ChkboxDGoods_c
PO Entry-
DB Field = PODetail_UD.ChkboxDGoods_c
epibinding = PODetail.ChkboxDGoods_c
I do this post processing on PO.ChangeDetailPartNum. I took my code and flipped it for your fields. I can’t test it since I don’t have your UDs, but it has been running for years, so test in pilot to be safe.
/* Set checkbox */
foreach (var ttPODetailRow in (from ttPODetail_Row in ds.PODetail
where (ttPODetail_Row.Added() || ttPODetail_Row.Updated())
select ttPODetail_Row))
{
using (System.Transactions.TransactionScope txScope = IceDataContext.CreateDefaultTransactionScope())//start the transaction
{
bool Part_ChkboxDGoods_c = Db.Part.Any(Part_Row =>
ttPODetailRow.Company == Part_Row.Company && ttPODetailRow.PartNum == Part_Row.PartNum
&& Part_Row.ChkboxDGoods_c == true);
{
if (Part_ChkboxDGoods_c == true )
{
ttPODetailRow.SetUDField<bool>("ChkboxDGoods_c",true);
}
}
}
}