COMPANYNAME Vs Company.Name

navuser1navuser1 Member Posts: 1,329
Dear Sir,

What is the correct procedure to use the COMPANYNAME instead of "Company.Name" in C/AL programming ?

In a scenario we'r using the COMPANYNAME in the Mail body and the "Company.Name" in a NAV report which is being used as a attachment (as PDF format) with the mail.

We have found that COMPANYNAME is appearing sometimes wrong but "Company.Name" is giving always right information.

May I know what is the reason behind that issue ?
Now or Never

Comments

  • slmaluwaslmaluwa Member Posts: 366
    hi
    Thas because, COMPANYNAME is a database level function which return the Company name you opened (under File-->Company-->Open). But, you normally store the legal name of the company in Company Information table. Name is a filed of that table.

    When referring to legal names, please store them in Company Information and use it in reports.
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
  • navuser1navuser1 Member Posts: 1,329
    The two COMPANYNAME and Company.Name are used in Mail.

    Users first open a Sales Order and then Post the SO, during the posting a Mail is generated and send to the respected customer mail ID.

    COMPANYNAME name appeared wrong but Company.Name is giving the right information.
    Now or Never
Sign In or Register to comment.