How to solve "Overflow Under Conversion" in Field External Document in Sales Order

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

Solution (Not Verified) This post has 0 verified solutions | 7 Replies | 2 Followers

Male
28 Posts
260 Points
Joined: 2012-7-18
Last Online:
2013-6-14 6:42
Location: Jakarta
Lie Yan posted on 2012-9-5 6:58

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 ? :)

All Replies

Male
2,346 Posts
34,145 Points
Joined: 2006-4-10
Last Online:
2013-6-18 3:56
Location: Pune India
Moderator
Amol replied on 2012-9-5 7:36

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

Male
736 Posts
12,939 Points
Joined: 2009-10-6
Last Online:
2013-6-18 6:48
Location: Warnsveld, Netherlands
DynamicsNAVMVP
Luc van Vugt replied on 2012-9-5 8:40

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 ICT
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community

 

Male
28 Posts
260 Points
Joined: 2012-7-18
Last Online:
2013-6-14 6:42
Location: Jakarta
Lie Yan replied on 2012-9-5 10:32

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;

END;

Do you have any suggestion to what i should do next ?

 

 

Male
2,346 Posts
34,145 Points
Joined: 2006-4-10
Last Online:
2013-6-18 3:56
Location: Pune India
Moderator
Amol replied on 2012-9-5 10:36

Change the Width of parameter ExternalDocNo to 30 charcters

 


-Amol

http://dynamicsuser.net/blogs/amol

Don't forget to  the post(s) that solved your problem

4,028 Posts
88,360 Points
Joined: 2009-2-17
Last Online:
2013-6-18 7:47
Location: New Delhi
DynamicsNAVMVP
Moderator
Mohana replied on 2012-9-5 10:42

Change the length in Parameters..

But you will get this error message in future also..

How do you identify the local/global variables?

Male
873 Posts
18,070 Points
Joined: 2003-3-16
Last Online:
2013-6-11 18:07
Location: New York
DynamicsNAVMVP
Solution (Not Verified) Savatage replied on 2012-9-5 16:33
Suggested by Erik P. Ernst

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 MVP
www.CosmeticSolutions.com
www.AutismSpeaks.org

Male
6,791 Posts
158,472 Points
Joined: 1995-10-1
Last Online:
2013-6-17 23:35
Location: Middelfart, Denmark
DynamicsNAVMVP
SystemAdministrator
Erik P. Ernst replied on 2012-9-10 10:43

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.

Best regards,
Erik P. Ernst
Webmaster 

DUG’s Admin's Blog

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.

Page 1 of 1 (8 items) | Get this RSS feed | Bookmark and Share