Overflow Under Type Conversion of Text to Code

BeatriceBeatrice Member Posts: 346
Hi,

When we open the Purchase Order window, we get the following message:

Overflow under type conversion of text to code.
Value: ncahannac-rh


Please advise.

Thanks and Regards,
Beatrice.

Comments

  • modricmodric Member Posts: 42
    Some CODEs are of length 10 only, your string happens to longer.

    Which place exactly causes the error upon autoinsert in PO Header you may find examining the value NAV shows - knowing your system it shouldn't be difficult.
    Modris Ivans
    MCP, Dynamics NAV - Application
  • BeatriceBeatrice Member Posts: 346
    This error occurs when we try to open the PO.

    Do you think that the User ID Name should be reduced in length?

    Thanks and Regards,
    Beatrice.
  • BeatriceBeatrice Member Posts: 346
    The User ID field is of Type Code and the length is 20.

    So I do not think this is because of the User ID length.

    Can it be because the User ID contains a "-"?

    Thanks and Regards,
    Beatrice.
  • modricmodric Member Posts: 42
    For me in ver3.70 the field "User ID" in PO Header table is a custom (locally added) field of type Code(20) - so its of little use for you :)

    If you have some user(s) with IDs up to 10 chars in length, try logging in as such user and check if problem disappears - if so, you have 2 options: make all userIDs shorter to fit the lenght, or, change the length of this field in PO Header, but it can be done with full DEV license if it is a standart field (not in 50000.. range).

    Hope this helps,
    Modris Ivans
    MCP, Dynamics NAV - Application
  • napoleonnapoleon Member Posts: 15
    Beatrice wrote:
    This error occurs when we try to open the PO.

    Do you think that the User ID Name should be reduced in length?

    Thanks and Regards,
    Beatrice.


    by User Id what do you refer to ?
    As simple as it can be, that how I like it!
  • BeatriceBeatrice Member Posts: 346
    We do not have the User ID field on the Purchase Header.
  • fidelfidel Member Posts: 14
    Use the Debuger in order to find the excaxt point that the error ocurs. There you will see the variable assigments that generate the problem in order to fix it
    :)
  • David_CoxDavid_Cox Member Posts: 509
    This looks like a customisation error, it is not standard, are there any new modifications on the system?

    User ID is Code 20 in the standard tables etc: so these would not Error.

    This error can be on the Header or Line, and likely to be at form level, it is trying to put your string ncahannac-rh into a code 10 field.

    David
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • modricmodric Member Posts: 42
    Beatrice wrote:


    Overflow under type conversion of text to code.
    Value: ncahannac-rh

    I suggested you found out that the abovequoted IS User ID.

    If it is not, then you should investigate further, WHERE exactly NAV tries to insert this value in PO Header...
    Modris Ivans
    MCP, Dynamics NAV - Application
  • DenSterDenSter Member Posts: 8,304
    Take Fidel's advice and run the debugger. It will tell you exactly where what is going on, and it should be an easy thing to diagnose.
  • jlandeenjlandeen Member Posts: 524
    I agree it is probably best to turn the debugger on and try and find out where it is stopping. As the error indicates that there is a type conversion taking place - is it possible that maybe the wrong field has been specified in some code?

    A common bug that I have seen in the past that throws this type of error is when there is custom code that is building a filter to check some value during a validation or form trigger.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • BeatriceBeatrice Member Posts: 346
    Hi,

    With your help I found out that the User ID is being used in a table, which was added by us.

    The User ID is defined with Code 10, that is why the system was giving this error.

    I am not able to modify the User ID. Can I delete it and create a new one?

    Thanks and Regards,
    Beatrice.
  • fidelfidel Member Posts: 14
    You cannot delete a field on a table if the field has value on at least 1 record. I think you can change the field in order to make it bigger (form Code 10 to CODE 20).
    If this is not possible try the following.
    Make a new field on the TABLE with name xxx CODE 20.
    Make a proccess only report and copy the value of the OLD field to the new field nad delete the value of the old field without Validating anything.
    After that the OLD Field will be empty and the new field will have the old values.
    Change the OLD Field to CODE 20. If it is not possible just delete the old field, save, make a new field with the ODL fieldID and save again.
    change the proccess only report to copy back the values of your field.
    Delete the empty field and you will be fine
  • BeatriceBeatrice Member Posts: 346
    Thanks for reply.

    I have modified the length of the USER ID field in the table from Code 10 to Code 20.

    It is working fine.

    Thanks and Regards,
    Beatrice.
  • dynamics_prasanthdynamics_prasanth Member Posts: 153
    I was able to create a customer with a name of 50 chars. But when I selected the same customer in Journal Voucher, I got this error. The Journal voucher description field and customer name field are of the same size. Then where could be the issue?
  • BeliasBelias Member Posts: 2,998
    it can be a variable to which the field is assigned to...debug as suggested before in this topic
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.