Extend Length of Item No.

whyaskqcnwhyaskqcn Member Posts: 22
Hi,

Anyone has any suggestion on the best way to extend the length of Item No. from C20 to C25 instead of using No.2 or adding another new field. I need Item No. to be the main identifier in many areas. Or is there another alternative which I may not be aware of in Nav 4.0?

Cheers,
YYY

Comments

  • WaldoWaldo Member Posts: 3,412
    You CAN use "Search Name" to have 30 characters available ... but off course, the possibilities are limited. Changing the length of the field is going to give you many problems:
    - variables have to be enlarged
    - reports have to be changed (larger number)
    - all tables which have a link to the Item No. have to be changed
    - ...

    Usually I don't recommend to change the length of a field ...

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Timo_LässerTimo_Lässer Member Posts: 481
    Another way could be to use the Item."No." only for database internal references and everytime you display another field as the "Item No.".
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • whyaskqcnwhyaskqcn Member Posts: 22
    Thanks Waldo and Timo for your suggestions. Felt that the effort involved using other fields is almost equivalent to changing the length of Item No. as the user specifically want to see the Item No. in screens and reports. ](*,)
  • wochmwochm Member Posts: 26
    Hello!
    When increasing field length I recommend you to use Navision Developers Toolkit to find and modify all occurences of a field (e.g. "Item No.") in the rest of objects. Only TRANSFERFIELDs statements you have to find "manually".

    Pozdrawiam/Best Regards
    Marcin Woch
    _____________________
    "ANTEI" Woch Marcin
    email: mwoch@antei.com.pl
    www: http://www.antei.com.pl
    tel.: (+48608) 39 46 29
    Poland
  • whyaskqcnwhyaskqcn Member Posts: 22
    Thanks... I have got all the tables where the field is using tbrower. Not too tough though \:D/ Thanks to the thoughtful guys in this forum.

    Currently looking at forms, reports and code units. This is manual and tedious. Getting to feel that there is not much to change for these.
  • wochmwochm Member Posts: 26
    Hello!
    Using mentioned NDT you can do it relly fast almost without manually work.

    Pozdrawiam/Best Regards
    Marcin Woch
    _____________________
    "ANTEI" Woch Marcin
    email: mwoch@antei.com.pl
    www: http://www.antei.com.pl
    tel.: (+48608) 39 46 29
    Poland
  • WaldoWaldo Member Posts: 3,412
    With NDT you get the "relations" only. What about the variables which are filled with the Item."No." ? You don't get these with the NDT ... and THAT's what the problem is ...

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Timo_LässerTimo_Lässer Member Posts: 481
    Waldo wrote:
    With NDT you get the "relations" only. What about the variables which are filled with the Item."No." ? You don't get these with the NDT ... and THAT's what the problem is ...
    That's not correct. If you check "Search C/AL Code", you also will find C/AL Code where the field is used.
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • WaldoWaldo Member Posts: 3,412
    And what do you have to search for then?
    recItem."no."
    or
    Item."No."
    or
    i."No."
    or
    bleh."No."
    ...

    I sure as hell can't search for "No."...

    You know what I mean? If the record-variable is always the same name (like recItem), this is no problem, but no one can guarantee this, off course... definitally not in customized functionality ... .

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • WaldoWaldo Member Posts: 3,412
    Just thinking of something else ... what about assigning Item."No." to a variable, and passing that variable to a parameter of a function?

    Really ... changing the length of a datatype is not a good idea...

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • StephenGStephenG Member Posts: 99
    Answer the question and wait for the answer.
  • Timo_LässerTimo_Lässer Member Posts: 481
    Waldo wrote:
    And what do you have to search for then?
    recItem."no."
    or
    Item."No."
    or
    [...]

    You shouldn't use the source finder.

    Use the "Where used..." function and you can trace the way that the value of the field will go.
    "Where used" searches for all references (by field name, field no., record (transferfield), RecRef, FieldRef, ...).

    But be aware: It's still a large project to extend a field!
    Three years ago, we extended the Item.Description from Text[30] to Text[50]. We could stop at the sales line / purchase line because they are by default Text[50] but we need more than a week to find all fields, parameters, variables, ...
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
Sign In or Register to comment.