when i try to do so & run the code i am getting this error Function JournalForm::fromArgs has been incorrectly called. static void Job89(Args _args) { ProdTable prodTable; ProdJournalTable prodJournalTable; Args args; MenuFunction mf; // ProdJournalCheckPostBOM prodJournalCheckPostBOM; ProdJournalCheckPost prodJournalCheckPost; ; args=new Args(); //PD13002389 prodTable=ProdTable::find(‘PD13002388’); //prodJournalTable.clear(); //selected the prodJournalTable from the particular PO to be posted select prodJournalTable where prodJournalTable.ProdId== prodTable.ProdId && prodJournalTable.JournalType==ProdJournalType::Picklist; //now pass it to the class which will post as there is no static method prodJournalCheckPost.init(); args.record(prodJournalTable); mf = new menufunction(identifierstr(ProdJournalPost), MenuItemType::Action); mf.run(args); */ }
Hi Rohit,
You can try the following to post the picking list journal using job.
static void Job1(Args _args)
{
ProdJournalTable prodJournalTable;
ProdJournalCheckPost prodJournalCheckPost;
;
select firstonly prodJournalTable
where prodJournalTable.JournalId == ‘JournalId’ && // input your journal id
prodJournalTable.JournalType == ProdJournalType::Picklist;
prodJournalCheckPost = ProdJournalcheckPostBOM::newJournalCheckPost ( true
, true
, JournalCheckPostType::Post
, prodJournalTable.tableId
, prodJournalTable.journalId
);
prodJournalCheckPost.run();
}
Regards,
Raghav.
thanks buddy you saved my day…