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,234

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

  • Verified answer
    MCallebert Profile Picture
    45 on at
    RE: How to add Product name based on language selection

    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));

  • faiz7049 Profile Picture
    2,234 on at
    RE: How to add Product name based on language selection

    Hi Experts,

    Waiting for help.

    Thanks,

    Faiz

  • faiz7049 Profile Picture
    2,234 on at
    RE: How to add Product name based on language selection

    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,234 on at
    RE: How to add Product name based on language selection

    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

  • André Arnaud de Calavon Profile Picture
    294,137 Super User 2025 Season 1 on at
    RE: How to add Product name based on language selection

    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,234 on at
    RE: How to add Product name based on language selection

    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
    294,137 Super User 2025 Season 1 on at
    RE: How to add Product name based on language selection

    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?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,137 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,879 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans