Axapta : Posting journal by code


static void InventJournalCheckPost(Args _args)
{
InventJournalTable inventJournalTable;
InventJournalCheckPost journalCheckPost;
;
ttsbegin;
inventJournalTable = InventJournalTable::find("xxx",true);
//Remove Journal "xxx" has not been locked by system
inventJournalTable.SystemBlocked = true;
inventJournalTable.update();

journalCheckPost = InventJournalCheckPost::newJournalCheckPost (JournalCheckPostType::Post,inventJournalTable);
journalCheckPost.run();

inventJournalTable.SystemBlocked = false;
inventJournalTable.update();
ttscommit;
}

Comments

Popular posts from this blog

ใต้ร่มกาสาวพัตร

ย้ายบ้าน

Google Gears