Notifications
Announcements
No record found.
How to get translation text of product name from InventTable record?
*This post is locked for comments
please use InventTable::ProductName
This method is public, no static. I tried but it returned Original Product Name. I need translated name
display EcoResProductName translatedOfProductName()
{
return InventTable::find(AGC_MCLInvoiceTemp.itemId).productName("en-us", AGC_MCLInvoiceTemp.inventDimId);
}
you can use the following that read direct from product translation table.
EcoResProductTranslation::findByProductLanguage(
_productRecId, LanguageId);
that's right. thanks Bilal
InventTable inventTable;
;
inventTable = InventTable::find(AGC_MCLInvoiceTemp.itemId);
return EcoResProductTranslation::findByProductLanguage(inventTable.Product, "en-au").Name;
thank you for your feedback, can you please verify my reply as answer .
Actually the original reply Bilal gave you seemed to be correct (more concise, at least)
display EcoResProductName translatedOfProductName() { InventTable inventTable = InventTable::find(AGC_MCLInvoiceTemp.itemId); return inventTable.productName("en-au"); //Note that you should ideally not hard-code the language, but look it up from some configuration table. }
Have you ever create Translations-button, form and functionality on a new simple list form in AX 2012?
Translations-button, form and functionality must be added in order to give description in multiple languages
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2