Need help updating InventOnhand field in Counting Journal

Hello,

I have written a x++ job to take part data from an excel file and create a Counting Journal inside Dynamics AX 2009. After opening the journal I noticed the Onhand field wasn’t populated with current Onhand quantities from DAX. This is exactly what I want. Where I am hitting a wall is finding out how to have the line refresh once the counter has inputted his/her count into the “counted” field. As soon as this data is entered I want the Onhand field to refresh to a current snapshot of quantity Onhand. Could anyone help with this? Thanks!

-Shawn

I solved my problem, and I figure I’ll post my solution on the off chance it helps anyone else out there. I added this line of code to the method attached to the InventJournalTrans → Counted relation under the InventJournalCount.

journalFormTrans.fieldModifiedInventDimFieldsPost(inventDim,fieldnum(InventDim,wMSLocationId));

Did the trick, now when the user inputs there count data it refreshed the onhand quantity to a new snapshot of inventory.

Cheers.