Error with 'post and print'

Hello, I made a technical update from Financials 2.6 to Attain 3.6 (german version) last week with no major problems during installation and conversion of the database. I installed the server with about 610 MB Cache with CommitCache enabled during installation. Everything is working well until… a user want ‘post AND print’. We have not made any changes in the code, still the same code from 2.6. If a user choose ‘post and print’ (either sales or purchase) Attain has a very stange behavior. See yourself: Menu - Purchase - Invoice create a new invoice with lines press shift-F11 (post and print). The first time you do this, you MAY get the invoice PRINTED. If you get the invoice printed, try a second time. The invoice is posted; the print is counted, but NO paper printed. Sometimes, you will fall back direct to the purchase menu. Next time you try either create or ‘post and print’ a new invoice, you get an error message, that the table 'purchase header does not exist); the number shown refers to the last invoice you have posted. However, I disabled the commit cache on the server. Still the same result. The same thing happened, but WITHOUT error message, if you choose a second report using Purchase & Payables - Setup - Report Selections Usage - Invoice Sequence 1 = 406 (Purchase Invoice) Add a sequence 2= 406 (Purchase Invoice) Create an Invoice (purchase) and ‘post and print’. You may get a second printout. Now, even more strange: Try it with the original 3.60 Database. Installed on a server or local. Everytime the same result. Any ideas? Kind regards Walter

Anyboby?

Hi, There was bug in codeunit “Post and print”. Some parameters was not returned from “post” codeunit. But it was solved with hotfixes. Have you installed all hotfixes?

Hi Gedas, I can’t find any hotfixes for 3.60 W1 or DE/SG versions. NTR S’pore has nothing released it yet. Are you sure there is a bugfix for 3.6? The bug seems more complicated than missing parameters. If you put a “messgage (‘Do you want to print the document’)” codeline into the post&print codeunit you do not get the error anymore! Regards Walter

Hi Walter, Maybe i’m wrong. There were long time ago when we found bug in 3.01 and the same in 3.10 and in 3.60 in codeunit “Post & print”. Later it was corrected. But maybe it’s not the same.

By today I received a list of the 3.60 hotfixes (see below) but, as anybody can guess, none of them is fixing the problem W1 3.60 hot fix 1: Corrects the initial Workdate set by the system W1 3.60 hot fix 2: Corrects the wrong sign in amount field for “Undo Shipment” and “Post Inventory Cost to G/L” jobs W1 3.60 hot fix 3: Corrects the CRM related errors when upgrading to Navision Attain 3.60 W1 3.60 hot fix 4: Corrects the “Commerce Portal - Update Customer Account from Web” process W1 3.60 hot fix 5: Corrects the User Portal compatibility problem with Internet Explorer 6.0 W1 3.60 hot fix 6: Corrects the Posting process errors in CRM Service area W1 3.60 hot fix 7: Corrects the errors related to using Responsibility Center and Sales/Purchase area

Hi, Maybe it’s german version problems?

No, at least 3.60W1 beta, 3.60W1 and 3.60DE

Hi, Yep. You are right. This is bug in Navision. The same bug was in not posted invoices and it was corrected. But print from posted invoices is still buggy. Wait for another hotfixes:) Or maybe samebody already has solution or i will try find it later this week:)[B)]

Hi, I was wrong again. It not that error I mentioned earler. This bug is in Sales Post & print and in Purchase Post & print. Mouse must be in lines. Then push Shift+F11. After post and printing sales forms is closed automaticaly without any message. This message we get later if open another system window (for example Code coverage). I tried use objects from working version 3.10 and get the same result, so problem is not in code. So i didn’t find any solution.

Try this: (former post from me) ----- snip ----- If you put a “messgage (‘Do you want to print the document’)” codeline into the post&print codeunit you do not get the error anymore! ----- snip ----- Regards Walter

Walter, I tried your solution, but it didn’t work for me. Do I have to put an IF… Confirm instruction, or just the message? Does is matter in which Trigger?? /Sven

quote:


Originally posted by Sven Noomen
Walter, I tried your solution, but it didn’t work for me. Do I have to put an IF… Confirm instruction, or just the message? Does is matter in which Trigger?? /Sven


I put the Code in Code Unit 232

Sven, I put “the message” in Codeunit 92 in Function “Print reports” (see below, copy from a German version…) ----- snip ----- BerichtsAuswahl.RESET; BerichtsAuswahl.SETRANGE(Verwendung,BerichtsAnwendung); BerichtsAuswahl.FIND(’-’); REPEAT BerichtsAuswahl.TESTFIELD(“Bericht ID”); MESSAGE(‘Druecken Sie OK um die Rechnung zu erhalten’); CASE BerichtsAnwendung OF BerichtsAuswahl.Verwendung::“EK-RG”: REPORT.RUN(BerichtsAuswahl.“Bericht ID”,FALSE,FALSE,EinkRechKopf); ----- snip ----- After adding this line the report will be printed without any errors. Do not ask me why. You should add this line in CU 82 as well. Kind regards Walter

Hi Walter, Thanks very much for your reply, but I have a question. I’am trying to post and print linen from the General Journal, and so I’ am not using CU 92 or 82, but 232. Does the same solution apply?? Thanks in advance. Sven

I guess NO. because the problem is related to the Navision client itself and not to the C/AL code. We tried everything: no commit cache (client and server), no dbms cache. But there is still “something” in the memory. Don’t ask me why the “message” is working in CU 82/92. As we only made a technical upgrade (2.6 code in a 3.60 environment) it can only be related to the client (same behavior with 3.6beta and 3.6). First I thought it is a problem with the license file, because we did not got the error with the Cronus license. But we ca reproduce the error with the Cronus license as well. There is another stange thing: During testing we found out that if you use “copy document (include header)” on the purchase invoice without having a document number assigned, the client crashes completely. That’s it for now. I would really appreciate any comments or hints on this issue. Kind regards Walter

Hi Walter, Did you report about error to www.partnerguide.com??? Or I can post into it.

Not me, I only mode a comment to HQ-689-857-9B6D but is is reported several times: HQ-689-857-9B6D NO-797-233-WE7Q DE-632-453-6N66 Regards Walter

OK. Wait for hotfix 9, or for answer: will be corrected in next release after next release.[:D]

Hi, To assure post and print from the General Journal add the following code to CU 13. OnRun(VAR Rec : Record “Gen. Journal Line”) GenJnlLine.COPY(Rec); Code; Rec := GenJnlLine; //.1 BEGIN “Line No.” := GLRegNo ; //.1 END