Hi,
if(InventJournalCheckPost::newPostJournal(journalTable).validate())
InventJournalCheckPost::newPostJournal(journalTable).run();
static
void
AlfasithPostJournal(Args _args)
{
InventJournalCheckPost inventJournalCheckPost;
InventJournalTable inventJournalTable;
;
inventJournalTable = InventJournalTable::find(
"INV-0001245"
);
inventJournalCheckPost = InventJournalCheckPost::newJournalCheckPost(JournalCheckPostType::Check, inventJournalTable);
inventJournalCheckPost.parmThrowCheckFailed(
true
);
// This true enable to prompt the error msg validate the journal
try
{
inventJournalCheckPost.run();
}
catch
{
info(
"The journal contains errors."
);
}
}
*************************************OR****************************************
static
void
AlfasithPostJournal(Args _args)
{
InventJournalCheckPost inventJournalCheckPost;
InventJournalTable journalTable;
;
journalTable= InventJournalTable::find(
"INV-0001245"
);
}
Regards,
No comments:
Post a Comment