[solved] Tips for FIELDCAPTION in multilanguage environment

jversusjjversusj Member Posts: 489
**Oops. Somehow I posted this in the wrong forum. This relates to Navision 4.0 with SP1. Sorry!

Hi. I searched the forum but was unable to find info on the following:

We have five languages available: English, Danish, German, French, and Italian.

In the Create Reminders process, when the system is processing the Additional Fee, it updates the
ReminderLine.Description := CurrencyForReminderLevel.FIELDCAPTION("Additional Fee")
The Navision help files suggest that FIELDCAPTION will first check the CaptionML field and then resort to the field name if nothing is found.

I am testing this with a customer whose language is defined as French (example). When I create the reminder for this customer, in a system set to English, it pulls the English name of the field and ignores the French CaptionML. If I then issue the Reminder, the print of the document is translated per the report CaptionML to French, yet this one line still reads in English. I can foresee this being an issue - "I could not pay this line item fee because I did not understand what it was for."

What might I be doing wrong?

Thanks in advance, as usual.

**thanks for moving to the right forum!
kind of fell into this...

Comments

  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    [Topic moved from Navision Attain to Navision forum]
  • kinekine Member Posts: 12,562
    You need to switch the language in the process to language based on the customer language. It is same like in the invoice report. You just need to call something like this:
    CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");
    

    Before the document is created. It will be for example somewhere in report 188.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • jversusjjversusj Member Posts: 489
    Ah! Thank you!

    I figured the function was enough to grab the captionML, but after adding the line you suggested, it worked like a champ!
    kind of fell into this...
Sign In or Register to comment.