web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to add Product name based on language selection

(0) ShareShare
ReportReport
Posted on by 2,382

Hi Experts,

I need to add Product name in Sales invoice. In product tranlsation , I have added arabic name under language "Arabic(ar)".

Please help me.

3823.Language.jpg

Thanks,

Faiz

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi Faiz,

    Are you using the standard invoice report , data provider or do you have a custom report data provider?

    What is the language selected on the customer and the sales order?

  • faiz7049 Profile Picture
    2,382 on at

    Hi Andre,

    We are using customized report.

    In data provider

    salesInvoiceTmp.ItemDescription=_custInvoiceTrans.salesLine().itemName();

    Through above code we are getting Product name. I want to include (concatenate) arabic name also. As in above screen shot, arabic name is fixed in "Product name" if language is selected "Arabic(ar)".

    Both Sales order and Customer language is "en-us"

    How to get Arabic text to Sales invoice report.

  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    HI Faiz,

    If you want to concatenate values, you need to rerieve the Arabic name. You can find the record using the find() method on the EcoResProductTranslation table.

  • faiz7049 Profile Picture
    2,382 on at

    Hi Andre,

    How and which filter I have to apply for get "language=Arabic(ar)" with field "Product Name".

    Because in Language there are Arabic and English. 

    Language1.jpg

    Thank,

    Faiz

  • faiz7049 Profile Picture
    2,382 on at

    Hi Andre,

    I tried using below code. Getting error "Variable has not been decleared".

    salesInvoiceTmp.NameAR=EcoResProductTranslation::findByProductLanguage(this.itemId(_custInvoiceTrans),ar);

    Please help me.

    Thanks,

    Faiz

  • faiz7049 Profile Picture
    2,382 on at

    Hi Experts,

    Waiting for help.

    Thanks,

    Faiz

  • Verified answer
    MCallebert Profile Picture
    45 on at

    Hi faiz.

    You're calling 

    EcoResProductTranslation::findByProductLanguage(this.itemId(_custInvoiceTrans),ar);

    This method awaits 2 parameters :

    - 1 product (refrecid)

    - 1 languageid

    And returns 1 object (EcoResProductTranslation)

    So there are 3 problems in your code:

    1) you give an itemid instead of a product

    2) you give a variable name "ar" that has not been decleared instead of a languageid

    3) You're not telling wich field of EcoResProductTranslation you want to put in your 

    salesInvoiceTmp.NameAR

    So the proper way to call this method should be :

    EcoResProductTranslation::findByProductLanguage(InventTable::find(this.itemId(_custInvoiceTrans)).product,"ar").Description));

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans