Posting Problem


I have a problem regarding the posting transfer journal lines after customization. I have two posting types for journal line. One button is for posting selected lines only and another is the standard Post button to post the journal. Error occured when I use post button to post after i post selected line. The error is the journal is not in use when I clicked on the post button.

This is the code that I use to update the numOfLines on InventJournalTable when selected lines is copied and posted on new journal and deleted from current journal. However the value for numOfLines on Transfer Journal will only update when I close the transfer journal line form. How can I make the numOfLines updated once the selection is posted and deleted without closing the form and revert the system back to in use after updation? Is there anything that I miss out?


Thank you


Posting journals is a bit straight forward if you use InventJournalCheckPost class. For ex -

journalCheckPost = InventJournalCheckPost::newJournalCheckPost(JournalCheckPostType::Post, parentInventJournalTable);
journalCheckPost.parmTransferErrors(true); //To transfer error lines to another journal

From your message above it is not clear what you are trying to achieve and what exactly the problem you are facing with. Please could you post more info along with version details?

NOTE: The above code is from Ax 3.0 environment.



I am customising InventJournalTransfer form in Ax 4.0 environment to post selected lines in the journal instead of posting the journal itself as in standard. Previously I have a bit problem with the control of InUse and SystemBlocked for the table in which return error when I do posting for the second time and updation of numOfLines when selected line(s) are deleted. However, I managed to solve the problem already.

Anyway, thank you for your reply Harish.