Update Default Warehouse

I could sure use some help. I am trying to create a Method Directive that updates the default warehouse when an inventory movement happens.

I know the criteria is correct because I've tried a message box in the 4GL and it appears when I do an inventory movement.


Here's my 4GL on the InvTransfer.CommitTransfer. Any suggestions?


for each ttInvTrans where (ttInvTrans.RowMod = "U" or ttinvtrans.RowMod = "A") no-lock.

If ttInvTrans.ToWarehouseCode = "MAIN" then do:
Find Partbin where partbin.partnum = ttinvtrans.PartNum no-lock no-error.
Run lib\UpdateTableBuffer.p(input BUFFER PartBin:HANDLE, 'BinNum', 'ttinvtrans.ToBinNum').
end.

end.