Hello everyone, yesterday i change field External Document No. from 20 character to 30 character in some table including Sales Header, Sales Invoice Header, Sales Shipment Header.
Suddenly problem comes up today as i am posting sales order. The message says :
OVERFLOW UNDER TYPE CONVERSION CODE TO CODE
Is there any faster way to know what table cause such problem ? :)
You need to change the length of external document no in Cust Ledger entry and Gen Journal Line table too
As well as you need to check whether any variable is used for updating external document No field in Codeunit
I would suggest never change the width of standard fields instead of add customized fields or convince the end user
As well as look at the David post
http://dynamicsuser.net/blogs/singleton/archive/2009/07/17/increasing-field-lengths-in-navision.aspx
-Amol
http://dynamicsuser.net/blogs/amol
Don't forget to the post(s) that solved your problem
Amol:I would suggest never change the width of standard fields instead of add customized fields or convince the end user
Fully agree.
BTW: in NAV 2013 External Document No. has been stretched from 20 to 35 characters. See my list of more fields that have been stretched: NAV2013 Glance 13: More Fields That Have Been Stretched
Luc van Vugt, Imtech ICTNever stop learningVan Vugt's dynamiXsDutch Dynamics Community
I've done what you said. I have already changed the length in some table, but it seems i still have the same message.
I tried to activate debugger, and it stopped at codeunit 5802 here
PostInvtPostBuf(PostDate,DocNo,ExternalDocNo,Desc,PostPerPostGrp,ValueEntryNo)
>WITH GlobalInvtPostBuf DO BEGIN
RESET;
IF NOT FIND('-') THEN
EXIT;
GenJnlLine.INIT;
GenJnlLine.VALIDATE("Posting Date",PostDate);
GenJnlLine."Document No." := DocNo;
GenJnlLine."External Document No." := ExternalDocNo;
GenJnlLine.Description := Desc;
GetSourceCodeSetup;
GenJnlLine."Source Code" := SourceCodeSetup."Inventory Post Cost";
GenJnlLine."System-Created Entry" := TRUE;
GenJnlLine."Value Entry No." := ValueEntryNo;
REPEAT
IF SetAmt(GenJnlLine,Amount,"Amount (ACY)") THEN BEGIN
IF PostPerPostGrp THEN
SetDesc(GenJnlLine,GlobalInvtPostBuf);
SetAccNo(GenJnlLine,GlobalInvtPostBuf);
InsertJnlLineDim(GenJnlLine,TempJnlLineDim,"Dimension Entry No.");
GenJnlPostLine.RunWithCheck(GenJnlLine,TempJnlLineDim);
END;
UNTIL NEXT = 0;
DELETEALL;
Do you have any suggestion to what i should do next ?
Change the Width of parameter ExternalDocNo to 30 charcters
Change the length in Parameters..
But you will get this error message in future also..
How do you identify the local/global variables?
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
I would change everything back. Who's giving you such large Inv or PO#'s or are you using that field to enter something other that?
12345678901234567890 - is a huge number
Harry Ruiz - Dynamics NAV MVPwww.CosmeticSolutions.comwww.AutismSpeaks.org
I would say as Harry, change it back!
The external document no. is used many places in NAV, and some places it's even validated against the "regular" document no. - that means to prevent you from any future problems with overflow, then you need to upgrade everywhere in the system where have "Document No." also.
Instead you should consider creating a new field to store this huge number, a field that might not be transferred to all posts in the system.
Don't forget to "Verify Solution" the post(s) that solved your problem. This credits the experts who helped, earns you points and marks your thread as Resolved so we all know you have been helped.