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)

please suugest me how to relate InventDim and inventTable for data updation

(0) ShareShare
ReportReport
Posted on by

Hi guys,

I have to update purchase warehouse , sales warehouse and stock warehouse for the set of items.

You can fine these fields for the particular item under "site specific order settings".

Can anyone please tell me how to relate these table inventDim and inventable as  i found there is no direct relation exist for relating them.


Regards,
Pankaj Kumar
MSD AX Technical Consultant

*This post is locked for comments

  • Verified answer
    zeeshan.shaikh Profile Picture
    683 on at

    You can use below tables to update the warehouse on site specific and default order settings:

    1. InventItemInventSetup

    2. InventItemPurchSetup

    3. InventItemSalesSetup

    See their relations with inventDim and inventTable.

  • Suggested answer
    Community Member Profile Picture
    on at

    Thanks for the reply. I have written this job by using these tables.

    ------------------------------------------------------------------------

    static void WarehouseUpdation(Args _args)

    {

       InventTable             inventTable;

       InventDim               inventDim;

       InventItemPurchSetup    inventItemPurchSetup;

       InventItemSalesSetup    inventItemSalesSetup;

       InventItemInventSetup   inventItemInventSetup;

       int                     noOfRecords;

       ;

       inventDim.InventLocationId = "020305";

       inventDim = InventDim::findOrCreate(inventDim);

       while select inventTable

       where inventTable.ItemId like "YS3*"

       {

           ttsbegin;

           select forupdate inventItemPurchSetup

               where inventItemPurchSetup.ItemId == inventTable.ItemId;

           {

               inventItemPurchSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemPurchSetup.doUpdate();

           }

           select forupdate inventItemSalesSetup

               where inventItemSalesSetup.ItemId == inventTable.ItemId;

           {

               inventItemSalesSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemSalesSetup.doUpdate();

           }

           select forupdate inventItemInventSetup

               where inventItemInventSetup.ItemId == inventTable.ItemId;

           {

               inventItemInventSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemInventSetup.doupdate();

           }

           ttscommit;

           noOfRecords++;

      }

       info(strFmt("No of Records updated is : %1",noOfRecords));

    }

  • zeeshan.shaikh Profile Picture
    683 on at

    If you are updating site wise settings then you also must specify sites for inventDim.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans