Extend Company Name size

vyankuvyanku Member Posts: 791
My clients comapny name contains more than 30 charactors.
When I am trying to change the length of name field in company table it will not allowed me do it.
How can I extend this length???

Comments

  • WaldoWaldo Member Posts: 3,412
    You should always be careful with resetting the length of a field. This can have complications in your application:
    - Variables that are filled with your field could be set for 30 ... when this code is executed, you'll have an overflow error message
    - Same story for fields
    --> using NDT, this can be analysed.

    You can edit the Company Information table if you have the right license.

    When you want to reset the length of the "Company" virtual table, this is not possible, even with a developer's license. You can add fields to the Company table, but you can't change the length of the "Name"-field.
    This should be no problem though, because this field is never used on no report. The field in the "Company Information" is used in the reports... .

    Hope this helps.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • kinekine Member Posts: 12,562
    Just for info: from version 5.0 the standard length for names and addresses is 50 characters...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    kine wrote:
    Just for info: from version 5.0 the standard length for names and addresses is 50 characters...
    Yes, but the name in the Company table (table 2000000006) is still 30 :| .
    I guess that's what he was talking about.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • vyankuvyanku Member Posts: 791
    But in report we r using COMPANYNAME for company name. We are not using the company information table for displaying company name in report.
  • WaldoWaldo Member Posts: 3,412
    Yes,

    but COMPANYNAME is getting the Current Companyname where you're logged in.
    When you create a company to log in, it is stored in table "Company".
    So this is the same...

    :|

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • vyankuvyanku Member Posts: 791
    Is there any solution so that we can get the company name from company information table???
  • themavethemave Member Posts: 1,058
    not sure if this is your solution or not, but there is a field company name 2

    be default most reports that get the company name can combine name 1 and name 2 field to create the complete name

    this would give you 60 charatures to work with


    also, most reports use the responsibility center address, such as a po, or so. and the responsibility center also has a name2 field which by default is combined with the name field on the reports.
  • WaldoWaldo Member Posts: 3,412
    vyanku wrote:
    Is there any solution so that we can get the company name from company information table???

    declare variable: recCompanyInfo as "record" and subtype "Company Information".

    recCompanyInfo.GET;
    MESSAGE(recCompanyInfo.Name);

    :|

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Are you just trying to display the proper company name on reports??

    If so, what Waldo suggested is what Navision intends to have you get the company name. Almost all of the standard Navision reports uses CompanyInformation.Name.
  • themavethemave Member Posts: 1,058
    Alex Chow wrote:
    Are you just trying to display the proper company name on reports??

    If so, what Waldo suggested is what Navision intends to have you get the company name. Almost all of the standard Navision reports uses CompanyInformation.Name.
    and they combine name and name2 which allows you to have more then 30 letters
  • vyankuvyanku Member Posts: 791
    Are you just trying to display the proper company name on reports??

    If so, what Waldo suggested is what Navision intends to have you get the company name. Almost all of the standard Navision reports uses CompanyInformation.Name.

    Yes. I just want to display Porper company name on Report.
    I am doing as Waldo is suggested. It is doable and easy.
    I think its a bug that u cant insert more than 30 char in company name.
    Because many companys have big names and thay may get penalty if short name is displayed on the documents.
  • WaldoWaldo Member Posts: 3,412
    But it IS possible ... . Just use "Name" and "Name 2" as already suggested.
    recCompanyInfo.GET; 
    MESSAGE(recCompanyInfo.Name + ' ' + recCompanyInfo."Name 2");
    

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • DenSterDenSter Member Posts: 8,307
    vyanku wrote:
    I think its a bug that u cant insert more than 30 char in company name.
    There is a difference between a :bug: and a difference of opinion about a design decision. This is not a :bug:
Sign In or Register to comment.