I added a new display method column to form: UnitOfMeasureLookup.
The standard columns are: Unit, Description and Translated Description where the last 2 columns are also display methods.
When the user is in edit mode in the sales order lines, and he/she clicks on the sales unit dropdown that opens the UnitOfMeasureLookup form, I must show the new display method and hide the Translated description display method.
When the user is in Product edit mode and click on the dropdown for purchase order units for example, the form must show the standard columns, thus the translated description display method column and not the new display method column.
I was able to hide/show the columns as needed. However AX shows the forth column even though it is blank. How do I tell in X++ for AX not to allocate space for the column that is hidden. In C# I would have run the bind() method of the grid again. There is no such thing in X++. We are using AX 2012 R3 cu12.
Salesorder Line:
![]()
Product details:
![]()
I'm overriding the Active-method of the datasource to hide/show the column depending from where the lookup form is called