Update PreviousDueDate for PORel

Hi. I want to store the Due Date if it is changed and although it doesn’t update automatically there is a PreviousDueDate field. I thought the best way to do this would be using a .p file in a BAM but I can’t seem to get it to update the record.

I have the following:
{ud/GlbAlert.i &TableName = “PORel”}

run lib\updatetablebuffer.p(input BUFFER PORel:HANDLE, PreviousDueDate,OLDPORel.DueDate).

I have also tried ‘assign’, and using a UD date field and neither of those options seem to work either. I know the field names are correct as the .p file also sends an email confirming the data.

Am I missing something or do I need to do this another way? Thanks.

I have also tried doing this via BPM.

If I do it by Pre-Process the data is shown correctly in the server log but the file just doesn’t update:
[17/01/12@12:34:08.220+0000] P-004256 T-004260 1 AS – (Procedure: ‘UpdatePre246_A1 bo/PO.p’ Line:4737) BPM Running - Due Date Changed - PORel Num-Line-Rel \ Due Date: 41018-2-1 \ 12/28/16
[17/01/12@12:34:08.220+0000] P-004256 T-004260 1 AS – ** No _File record is available. (91)
[17/01/12@12:34:08.220+0000] P-004256 T-004260 1 AS – ** 4GL Debug-Alert Stack Trace **
[17/01/12@12:34:08.220+0000] P-004256 T-004260 1 AS – --> lib\updatetablebuffer.p (E:\epicor\mfgsys803400\Server\lib\updatetablebuffer.r) at line 483

If I try using a Post-Process then the tt table already has the new data so I tried passing a string with the information but regardless of if I use the main table or tt table I still have the same issue that the data is showing correctly in the server log but the update isn’t being processed.

I’m not sure of any other way to catch this?