Post a Gen. Journal Line automaticaly

Is it possible import data to Gen. Journal Line table and automaticaly Post alld records, withot pressing F11??

I am thinking on a dataport with some function on OnAfterImportRecord()

Regards

I hope we can do it bu copying the code which is under post button… but we need to send the correct record in that function

Is there any exemple where I can Get the idear???

Regards

If you check codeunit 80 (post sales invoice), then you will see that what this codeunit is actually doing is to insert all the data into General Journal lines and then uses codeunit 12 to post the lines with.