Hi All,
I am using the following code to post job cards in production order but getting an error with the cancelation of the job card in the D365 F&O environment.
Can someone helps me with the same?
static void checkPostProdJournalTableRouteJob(Args _args) { JournalCheckPost journalCheckPost; ProdJournalTable prodJournalTable = ProdJournalTable::find("JRAE000162", true); // Check/Post journal journalCheckPost = ProdJournalCheckPostRouteJob ::newJournalCheckPost(false, true, JournalCheckPostType::post, prodJournalTable.TableId, prodJournalTable.JournalId); journalCheckPost.run(); }
Hi Samir Sharma,
What issue are you facing now?
Please try the below code:
static void checkPostProdJournalTableRouteJob(Args _args) { JournalCheckPost journalCheckPost; ProdJournalTable prodJournalTable = ProdJournalTable::find("JRAE000162", true); prodJournalTable.VoucherDraw = journalVoucherDraw::Post; // Check/Post journal ProdJournalRoute prodJournalCheckPostRoute = ProdJournalCheckPostRoute::newPostJournal(prodJournalTable.journalId,true); prodJournalCheckPostRoute.run(); }