
We are designing a view that has the basic structure of an order and order product(lines). Creating this view is trivial. However, we also need to get the on hand value for each product in the order. This value is stored in a custom entity and can be reached by order => order product => product => inventory. This is easily done in FetchXml but not available in the view designer. We have tried various ways to create the view, each having it's own drawbacks.
* Create the order/order product view, export and modify it to add the inventory relationship and import back in. Works but the view displays the alias column header such as "api.ps_onhand" and there doesn't seem to be a way to change it to "On Hand".
* Add the on hand field to the order product entity, modify the query in a plugin on pre-op and populate the field in the post-op. This works but seems like a lot of work to go through and would need to be updated if we add more fields.
Is there a better way to create a view to access data that is multiple levels deep in the hierarchy?
Thanks,
Paul.
Hi Paul,
What is the entity relationship between product and inventory?
We can use Nested Editable Grids to display related records at the grandchild level.
community.dynamics.com/.../nested-editable-grids-in-d365-ce-v9-uci