Easiest way to change field length?

gulamdastagirgulamdastagir Member Posts: 411
Hi

i want to know the easiest way to change the field length of serial no. field in all navision objects from field length 20 to 40???
Regards,

GD

Comments

  • JutJut Member Posts: 72
    easy way:
    Create a form on the table "field"
    filter the field name to "seriel no." and just change the field length in all necessary tables.

    this is an easy way but you won't have any trace in the changed objects. thus I would not recommend it too much.
  • ara3nara3n Member Posts: 9,256
    edited 2007-11-07
    :-#

    Run Developer toolkit and do a where used on all those fields.
    You'll have to modified hundreds of objects.

    what kind of company needs 40 characters for serial No.?

    What kind of inventory do they have?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    Jut wrote:
    easy way:
    Create a form on the table "field"
    filter the field name to "seriel no." and just change the field length in all necessary tables.

    this is an easy way but you won't have any trace in the changed objects. thus I would not recommend it too much.

    But it is not enough. You need to change all variables working with Serial No., all parameters where the value is passed etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Member Posts: 9,256
    I would talk the client out of it.

    My guess their vendor has some kind of serial no that is that long.
    I would rather create internal Serial No.. In serial No information table I would create a 40 Length field and insert that serial no for reference or printing on documents.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jlandeenjlandeen Member Posts: 524
    I cannot stress enough...do not change the size of the Serial No. or Lot No. field, put it in another field/table & link to it.

    I agree with everything that people have posted here and I have seen this tried years ago on a project. It was a huge waste of time and it requires you to update Navision's standard Item Tracking C/AL code which is all over which means upgrading the objects to another version is a nightmare.

    DON'T DO IT!!
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • themavethemave Member Posts: 1,058
    not the response you wanted I know, but still changing field lengths is one of the most requested and toughest thing to do.

    in general it is not advised, especially on key fields

    Just wondering, we are in the auto industry, and have many items serialized from vendors, transmissions for example. Even the VIN number is only 17 digits, and that handles all the worlds automobiles with a unique id.

    A 40 digit serial number is very big, what industry is this.
  • themavethemave Member Posts: 1,058
    if you find it is too hard to change the field length, maybe you can instead make a routine where you can enter your serial number on a new field. and have a calculation done on it to create a new serial number that can be used in the standard field.

    for example here is how a vehicle id (VIN) is created

    http://www.vehicleidentificationnumber. ... etail.html

    now, if your serial numbers have a set format also. for example say it contains the full date with a four digit year. your routine could change the 4 digit year to a single digit letter. so depending on how your serial numbers are formed, you may be able to create a simple translation routine to handle them. Just an idea anyways.
  • gulamdastagirgulamdastagir Member Posts: 411
    ara3n wrote:
    :-#

    Run Developer toolkit and do a where used on all those fields.
    You'll have to modified hundreds of objects.

    what kind of company needs 40 characters for serial No.?

    What kind of inventory do they have?


    Do i have to actually go to each "Serial No." field and modify the legth from 20 to 40.

    What abt the "Serial Nos." field should i modify it too?

    Is there a find and replace feature so i can make this changes automatically instead of manually going object to object
    Regards,

    GD
  • ara3nara3n Member Posts: 9,256
    I guess you don't want to listen to all the advise in this thread?
    Could you answer our questions first?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • gulamdastagirgulamdastagir Member Posts: 411
    iam just a humble developer taking orders from top management

    i tried my best to explain to them what you people have suggested

    but they insist

    1.Since this implementation is for own company not for clients.
    2.Field length is to accomadate the Microsoft Products Serial Nos.
    3.XYZ said that he had done similar thing where he modified the item nos and everything worked just fine and has been working since 3 years

    :mrgreen:
    Regards,

    GD
  • idiotidiot Member Posts: 651
    ...
    2.Field length is to accomadate the Microsoft Products Serial Nos.
    ...

    Can't stop laughing over this...
    #-o :lol:
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • ara3nara3n Member Posts: 9,256
    I would store the last 20 digits.
    Create a new field in Serial No. Information. And populate the CD 32 digit serial no.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • idiotidiot Member Posts: 651
    Still laughing but on a serious note I hope to learn something from this episode...
    The implementor recommends the module Serial No., after which it was found that the Serial No. was too short, hence a new field is created because the current one is too tedious to be extended.
    How does one explain this to the client that the module still requires workaround?
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • ara3nara3n Member Posts: 9,256
    This happens all the time.
    the Serial no. will need to be entered only at time of shipment.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • gulamdastagirgulamdastagir Member Posts: 411
    talked the management out of it \:D/
    Regards,

    GD
Sign In or Register to comment.