Wednesday, 13 December 2017

How to get list of products, product attributes and attribute values in AX2012 & AX7 / D365

I have came across a task in which I need to populate a grid that display a list of products, product attributes and attribute values. So Instead of getting all the related data sources I have created a view that shows Products, Product attributes and its value.

In AX2012 & AX7 / D365 there is already a view named EcoResProductAttributeValue but it cannot provide textual data instead it gives the Record Id's of multiple data sources. In my view I have use EcoResProductAttributeValue view but I have displayed values that is more meaningful as per my task context.

Simply I have created a query in which I drag and drop all the related datasources.
1- EcoResProductAttributeValue
2- EcoResAttribute
3- EcoResProduct
4- EcoResTextValue




























After that I have created relations as shown in image.




















After that I have simple created a view and set its Query property as shown below.





No comments:

Post a Comment

How to Get Customer Free Text Invoice "Totals" form field value with X++ in D365FO

Customer free text invoices are an essential aspect of financial management in D365FO. In this blog, I have compiled all the code needed to ...