Link checkboxes between applications

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);
                    }
                }
                
  

    }
}


WOW, thank you.
By any chance, can you please dumb it down a little?
I have no idea how to create or post a script or where to put it.

This is a BPM, so be very careful!

  1. Open the BPM Designer.

  2. Make sure “Method Directives” is set in the drop down.

  3. Click the Search, and find “PO” in the Services field.

  4. Choose “ChangeDetailPartNum”

  5. In the slide out on the left, click on the Directives icon (bottom), and click New

  6. Chose Post Processing, give it a name, description, etc.

  7. Drag a custom code block from the right-hand toolbox, and link it to the “start” widget.

  8. Click on the word “Code” in the grid under “Action”.

  9. Paste in Greg’s code, click save.

EDIT:

Also, be sure to check “Enabled” when it’s ready, or it won’t do anything.

Thank you @gpayne & @kve you are both lifesavers!

old post, but need to revisit as I am not getting an error on it.

Any assistance would be greatly appreciated

@LisaShirley Most of time searching here will dig up the solution. This was solved in 2022 by adding the .NET 6.0 SDK