Help with BPM - Trying to mark a PO Receipt as Received All

Hi All,

I reached out in a separate post but I haven’t had any luck yet.
I am trying to create a PO Receipt (Receipt Entry) from within a data directive. Everything is good except for the last part of marking the receipt as received.
I’ve tried two approaches:

  1. Mark header as “Received All”. The header does get checked but none of the lines are checked as received.
  2. Mark each line as Received. Some lines will correctly be marked as received. Some are not getting marked as received. Some are getting marked as received but the PartTran record is not created.

I’m hoping that someone can help me get past this last piece.
Here is a link to my code.