Hello everyone!
My customer has to post item journal lines periodically. I create a report that it reads some lines and it creates records in to Item Journal Line table. I'd like to post these records but I do not want that the Dialogue will appear " Do you want to post these lines or not"..
I know about the GUIAllowed Function. The codeunit which i m calling is "Item Jnl.-POST".
Can i call like this
IF GUIALLOWED THEN
CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post", ItemJournalLine);
Does the above code does not popup messages?
Thank you for your replies.
Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.
0
Answers
You have to customize codeunit Item Jnl.-Post. Include GUIALLOWED condition in Code Function as shown below :
IF GUIALLOWED THEN
IF NOT CONFIRM(Text001,FALSE) THEN
EXIT;
better way is to fill journal line "on the fly" without template, batch and line No. and post that line without inserting it into table - see codeunit 80 or 90 for example.
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.
IF GUIALLOWED THEN
IF NOT CONFIRM(Text001,FALSE) THEN
EXIT;
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.