posting orders and journals

I have a section of code that must perform a packing slip update on orders on the SalesTable and later post inventory transfer journals. The orders and journals are already built, but I’m not sure what code to invoke to cause them to post correctly. Could anyone point me in the right direction? Thanks!

Hi Draque,

To post journals, you can call either ‘newJournalCheckPost’ OR ‘newPostJournal’ methods under ‘InventJournalCheckPost’ class. Personally I prefer the first method. Example -

InventJournalTable inventJournalTable;
InventJournalCheckPost journalCheckPost;
inventJournalTable = InventJournalTable::find(“JournalId”);
journalCheckPost = InventJournalCheckPost::newJournalCheckPost (JournalCheckPostType::Post,inventJournalTable);;

Please note - the above code snippet is only an example. Please make sure you test this thoroughly before deploying it.

Hope this helps,

That was the solution I ended up using, thanks for the reply. ^^