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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Translations on ProductDimension Lookup

(0) ShareShare
ReportReport
Posted on by

How can I customize the ProductDimension Lookup to see the Translation values for a customer language

so when I try to select values with the lookup on an order I want to the Translation for the Dimension in customer language like this:

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    The form displayed for product dimensions lookup on, e.g., Sales orders, is called "InventProductDimensionLookup". That's the one you'd need to modify.

    Just to be clear, currently the translation of the product dimension name is not shown at all on that form on the first tab. You want to add it there, I assume?

  • Community Member Profile Picture
    on at

    Yes you are rigth I wanna add the translations there

  • Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    OK, so I guess that answers your question then? Or do you need some additional help in how to actually add the translation there?

  • Community Member Profile Picture
    on at

    some additional help would be nice...

  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    1. Add a new form level variable of type LanguageId, called custLanguageId.

    2. Add a method on the data source InventDimDimension called custProductName() with the below code:

    public display EcoResProductName custProductName(InventDim _inventDimDimension)

    {

       FieldId dimFieldId = element.inventDimSetupObject().parmMainSortFieldId();

       ItemId  callerItemId = element.inventDimSetupObject().callerItemId();

       return EcoResProductMasterDimValueTranslation::findByProductMasterDimValLanguage(

           EcoResProductMasterSize::find(InventTable::find(callerItemId).product, EcoResSize::findByName(_inventDimDimension.(dimFieldId)).RecId).RecId,

           custLanguageId).name;

    }

    3. Drag the method over to the grid GridDimension on the first tab page, and make sure to set the datasource on the control to InventDimDimension

    4. In the init method on the form, add the following code:

       FormDataSource      lineDS;

       SalesLine           salesLine;

    ...

       lineDS = callerControl.dataSourceObject().joinSourceDataSource();

       if (lineDS.table() == TableNum(SalesLine))

       {

           salesLine = lineDS.cursor();

           //custLanguageId = CustTable::find(salesLine.CustAccount).languageId();

           custLanguageId = salesLine.salesTable().LanguageId;

       }

    That should do it.

    You would of course need to "beautify" this code, and make sure it shows up when it needs to and not at other times (I gave an example above with checking for the table being SalesLine, but you could also check based on the field, the item, the form calling the lookup, etc.)

  • Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    Did this answer your question?

  • Community Member Profile Picture
    on at

    Currently I am not sure. First I have to get the code running because it is not compiling and than I have to extend to work for all dimensions (config, size, Color, ...)

  • Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    The lookup form is one for all product dimensions, so it will be shown for config,color,size and style automatically when you get the code compiled.

    what seems to be the compilation issues?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans