Avoid Messages in Codeunits

Hi,

i am using codeunit 231 “Gen. Jnl.-Post” and 80 “Sales-Post” for posting.

is there any way to avoid the pop up messages .

What kind of pop up messages are you talking abount?

the messages are:

“Are you really want to post the journal lines?”

and there are the dialog box and the progressing bar

Why do you want to do this?

Its better to have a confirmation message before posting…

whatever, if you really want to avoid this

Comment below code in CU231

IF NOT CONFIRM(Text001,FALSE) THEN
EXIT;

i am working on AutoPosting function in Navision integrated with other software and i don’t want want the user to do any action

while using Navision.

Is there another to not make changes inside codeunit ?

cz its affect to other form, and i only want to avoid these message only for this fucntion “AutoPost”

As I am not sure of how the other software work…i can simply guess this…

Will you have a USERID for other software?

if yes, you can differentiate with USERID…

or you can try by calling this code
GenJnlPostBatch.RUN(GenJnlLine);

or you can create new codeunit without confirmation dialogues and use that for other software…

In your “Auto Post” function you would not call codeunit 231.

One way is to mimic the codeunit (filter setting etc. on the Jouranl Line) and call codunit 13 directly.