Monday 20 August 2018

Display inventory dimensions dynamically in D365

In this blog I will discuss how you can add inventory dimensions in your custom forms. Please see step by step instructions.

Step: 1
First drag and drop the EDT (InventDimId) and create relation with InventDim.






















Step: 2

Add InventDim datasource in form and join (Inner Join) it with datasource which contains your item id.













Step: 3

Create a new group under your gird. Set its datasource property to InventDim and Data group property to InventoryDimesions.












Step: 4
Now write some code as shown in below images.

4.1 Add code in class declaration also on form init method add below highlighted code.












4.2 
Add inventory dimension class method in form.










4.3 
Add Update design method. Make sure that you use your Datasource Item Id also please read comments on code.




















4.4 
Override your Item Id Datasource active method and add below code.















Step: 5

Add InventDimParmFixed Display menu item to your action pane menu.













Result:















That is all you need to do.


You can also refer this link: How to: Dynamically display inventory dimension

4 comments:

  1. Can you please share the code to make Product, Storage and tracking dimensions mandatory in custom form based on item. Just like when we modify item Id on Sales/Purchase order lines all dimensions get mandatory.

    This code works well for enable/disable but i am looking for making invent dim fields mandatory too..

    Any help much highly appreciated in advance.

    ReplyDelete
  2. Can you please share the code to make Product, Storage and Tracking dimensions mandatory in custom form based on item. Just like Sales/Purchase lines when we modify item Id dimensions get mandatory.

    This code works well for enable/disable but i am looking for making invent dim fields mandatory too..

    Any help much highly appreciated in advance.

    ReplyDelete
  3. Dev Newbie here! This was an awesome walk-through! I used it successfully on a few listpages I'm building. I appreciate your clarity with this article as it saved me tons of time researching how to do this.

    ReplyDelete

How To: Customize BankPaymentAdviceVendV2 SSRS Report

In D365FO, there are two versions available for bank payment vendor invoices. However, in the latest version, Microsoft has made it mandator...