I am trying to suppress the dialog box that displays "Do you want to Post the journal lines?" while posting the journals.
The above dialog box is from codeunit "Gen. Jnl.-Post" .
How this can be achieved?
It is correct that in current version of Business Central it is currently not possible to suppress the dialog box. Not even via an extension. Just as Saurav wrote.
But hang on. You are working for a partner, then you may have access to the insider builds of Business Central. If you do then you will notice, that in the most recent (daily) master builds, there is now the ability to set a new HideDialog variable via an new OnBeforeCode event.
It was suggested on GitHub: https://github.com/Microsoft/ALAppExtensions/issues/964
So right now, unless you are "on-prem" then it's not possible. My guess would be that it would be there in the Spring 2019 release (April) it's currently just marked as "Ships in future release".
Thank you all for the suggestions.